RFR JDK-8037394: ZipFileSystem leaks file descriptor when file is not a valid zip file

Xueming Shen xueming.shen at oracle.com
Thu Jan 22 19:14:11 UTC 2015


Hi, please help review the changeset for

issue: https://bugs.openjdk.java.net/browse/JDK-8037394
webrev: http://cr.openjdk.java.net/~sherman/8037394

I'am not including a test case since it basically tests to run out of the
fd of that process...but I did reproduce the problem and verify the fix.

I also changed the implementation to throw a normal ZipException instead
of the "ZipError" (which is an internal vm error). It appears inappropriate
for the FileSystems.newFileSystem() to throw a vm error exception in case
a dedicated fs provider fails to handler the target file. The ZipError is a
leftover/copyover from the j.u.zip implementation.

Thanks!
-Sherman





More information about the nio-dev mailing list