Bug with the zip fs provider (7u72, 8u25), am able to create a corrupted zip...
Francis Galiegue
fgaliegue at gmail.com
Thu Jan 15 08:36:15 UTC 2015
On Thu, Jan 15, 2015 at 8:31 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 15/01/2015 00:42, Francis Galiegue wrote:
[...]
>
> I'm tied up with other things this week to try this but I assume the issue
> is that you aren't closing the zipfs. If you change it to try (FileSystem
> zipfs = ...) { ... } then I assume it should flush the output and create the
> zip file.
>
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");
}
--
Francis Galiegue, fgaliegue at gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/parboiled1/grappa (redde
Caesaris: https://github.com/sirthias)
More information about the nio-dev
mailing list