Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2047

When in withWriter() the writer is closed, an exception is thrown after the closure is exited

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1-beta-2
    • 1.1-beta-3
    • groovy-jdk
    • None

    Description

      The folowing code throws an exception "stream already closed"

      def outer = new StringWriter()
      def reader = new StringReader("Hallo Welt")

      outer.withWriter { writer ->
      reader.transformChar(writer)

      { it }

      }

      Attachments

        Activity

          People

            jbaumann Joachim Baumann
            jbaumann Joachim Baumann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: