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

I/O example on documentation web site fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.5.5
    • 1.5.7, 1.6-beta-2
    • None
    • None
    • JVM 1.6.0-b105; running on Ubuntu 7.04 (I think)

    Description

      Example on page http://groovy.codehaus.org/Input+Output does not work; goes into an infinite loop:

      new File("foo.txt").withReader { reader ->
      while (true)

      { def line = reader.readLine() }

      }

      Either the documentation is wrong or Groovy is; don't know which.

      Attachments

        Activity

          People

            paulk Paul King
            jdeisenberg J David Eisenberg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: