Grails
  1. Grails
  2. GRAILS-8582

Grails Response Writer does not allow use of leftShift() method (<<)

    Details

      Description

      In controller response.writer, of type GrailsRoutablePrintWriter, does not allow use of << operator (leftShift() method)

      The following code throws an java.lang.UnsupportedOperationException at org.codehaus.groovy.grails.web.sitemesh.GrailsRoutablePrintWriter$NullWriter.write(GrailsRoutablePrintWriter.java:243)

      response.writer << "text"
      

      The workaround is to use the write method or the targetResponse instead:

      response.writer.write("text")
      //or
      response.targetResponse.writer << "text"
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Lari Hotari
            Reporter:
            boillod manuel
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Last Reviewed:

              Development