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

break inside a while loop causes NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-3
    • None
    • None

    Description

      Mark Volkmann found this test case fails...

      import java.io.File
      file = new File('myFile.txt')
      file.withReader { reader |
        while (true)

      {     line = reader.readLine()     if (null == line) break     println line   }


      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            jstrachan James Strachan
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: