Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4144692

(spec) File.list() spec unclear about returning null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 1.1.3
    • core-libs
    • generic
    • solaris_2.6

      File.list() returns a null if you have no permission to see the requested information, at least on Solaris. The javadoc says nothing about null pointers returned. Should throw some io exception like "no permissions" or something.

      In fact, the two flavors of File.list() in the javadoc say nothing about some obvious error conditions. Only SecurityException is listed. According to a 3rd party doc I have, null is also returned if it "isn't a directory". I've gotten null to come out, under other implementations, just because the implementation didn't feel like going to the trouble. This whole area should be cleaned up.

            Unassigned Unassigned
            abonadiosunw Allan Bonadio (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: