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

Space chars at end of directory name confuses java.io.File.list()Shou

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 5.0
    • 1.4.2
    • core-libs
    • b40
    • x86
    • windows_nt

      On Windows, if you give a directory name with space-chars at the end
      (like "C:\foo\ ") to java.io.File then

      isDirectory() will return true, but the list() method
      will return null even if there are files in the directory:

      This breaks the contract between isDirectory()
      and list(), which is if isDirectory() returns true then
      list() must not return null. This situation arises from
      bug 4849568.

            mmcclosksunw Michael Mccloskey (Inactive)
            michaelm Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: