RFR JDK-8069211: (zipfs) ZipFileSystem creates corrupted zip if entry output stream gets closed more than once
Alan Bateman
Alan.Bateman at oracle.com
Wed Jan 21 19:27:45 UTC 2015
On 20/01/2015 20:13, Xueming Shen wrote:
> Hi,
>
> Here is the webrev that now synchronizes the write and close methods to
> guarantee we have a correct zip entry even when the output stream is
> accessed by multiple threads.
>
> http://cr.openjdk.java.net/~sherman/8069211
Having write + close synchronized is probably okay although there will
be corner cases where write might hang (NFS or other network connection)
and so close will block waiting for it. For the issue at hand then it's
okay.
What about the other Closeables, do they require any work?
-Alan
More information about the nio-dev
mailing list