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

(zipfs) FileSystemProvider.newFileSystem(Path, Map) should throw IOException when called with a file that cannot be open

XMLWordPrintable

    • b18

      New methods added by JDK-8219793 don't describe (or mismatch specified) scenarios when referenced path item is not present.

      There's
      "Throws: IOException if an I/O error occurs"
      declaration, however for example the following code:

      FileSystems.newFileSystem(Path.of("doesnotexist"));

      generates

      java.nio.file.FileSystemNotFoundException: doesnotexist

      And FileSystemNotFoundException is not a subclass of IOException.

            lancea Lance Andersen
            dbessono Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: