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

DefaultGroovyMethods File[] null check

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1-beta-1
    • groovy-jdk
    • None
    • Patch

    Description

      There is an open bug in the JDK: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4803836. File.listFiles() returns null when for the System Volume Information directory contrary to what the JDK reports. Several methods in the DefaultGroovyMethods class correctly expect the File[] not to be null according to the JDK. Rod Cope has added a null check to handle the bug in the JDK to the following methods: eachFile, eachFileRecurse, eachDir, and eachFileMatch. No testcase is provided since this must be run against an active drive and the code changes are simply null checks ( if (files != null) ).

      Attachments

        1. defaultmethodsfix.tar
          220 kB
          Tony Lauro

        Activity

          People

            blackdrag Jochen Theodorou
            drewwings Tony Lauro
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: