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.
- csr of
-
JDK-8223771 (zipfs) FileSystemProvider.newFileSystem(Path, Map) should throw IOException when called with a file that cannot be open
-
- Resolved
-