JDK-8231267 : (zipfs) FileSystemProvider.newFileSystem(Path, Map) should throw IOException when called with a file that cannot be open
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.nio
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 14
  • Submitted: 2019-09-19
  • Updated: 2019-10-03
  • Resolved: 2019-10-03
Related Reports
CSR :  
Description
Summary
-------

Invoking `java.nio.file.FileSystems.newFileSystem(Path)` to create a Zip file system throws `FileSystemNotFoundException` instead of `IOException` when the Zip or JAR file does  exist (the `create` option is not specified).

Problem
-------

Since the original Zip FS prototype in JDK 7, the Zip FS incorrectly throws `FileSystemNotFoundException` when the specified Zip or JAR does not  exist  and is not being created.

Solution
--------

Zip FS will throw a `NoSuchFileException`, which is a subclass of IOException, if the file does not exist and is not being created.



Specification
-------------

There is no change required to the specification.  
Comments
I see a release note is already planned. Moving to Approved.
03-10-2019