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

(fs) FileSystems.getFileSystem(URI) should throw IAE if the URI scheme is null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b19
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      If the scheme is null, FileSystems.getFileSystem(URI) will currently throw a mysterious NullPointerException. The package documentation for java.nio.file indicates that NPEs will in general be thrown if a parameter is null or an array or collection contains a null element, but this case does not meet those conditions. Also, using the URI as the detail message of an IAE could provide debugging clues.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bpb Brian Burkhalter
                Reporter:
                bpb Brian Burkhalter
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: