Bug with the zip fs provider (7u72, 8u25), am able to create a corrupted zip...

Alan Bateman Alan.Bateman at oracle.com
Thu Jan 15 13:27:44 UTC 2015


On 15/01/2015 08:36, Francis Galiegue wrote:
> :
>
> Erm... I do close the filesystem:
>
>      try (
>          // HERE
>          final FileSystem zipfs = FileSystems.newFileSystem(uri, map);
>          final OutputStream out
>              = Files.newOutputStream(zipfs.getPath("/t.json"));
>      ) {
>          mapper.writeValue(out, "hello");
>      }
>
Sorry, I mis-read your original mail as it looks like "try {". In that 
case, it needs investigation as closing a zip file system will close any 
open resources and clean up.

Sherman - do you recall why the deflaters are ended after closing the 
channel to the zip file?

-Alan


More information about the nio-dev mailing list