Stefan Bodewig created COMPRESS-241:
---------------------------------------
Summary: writing 7z entries with LZMA2 fails when closing the
stream
Key: COMPRESS-241
URL: https://issues.apache.org/jira/browse/COMPRESS-241
Project: Commons Compress
Issue Type: Bug
Components: Archivers
Affects Versions: 1.6
Reporter: Stefan Bodewig
Fix For: 1.7
closing archive entries that use LZMA2 compression fails on JDK8 early access
build 113 due to:
{code}
org.tukaani.xz.XZIOException: Stream finished or closed
at org.tukaani.xz.LZMA2OutputStream.flush(Unknown Source)
at java.io.FilterOutputStream.flush(FilterOutputStream.java:140)
at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
at
org.apache.commons.compress.archivers.sevenz.LZMA2Decoder$FinishOnCloseStream.close(LZMA2Decoder.java:67)
at java.io.FilterOutputStream.close(FilterOutputStream.java:159)
at
org.apache.commons.compress.archivers.sevenz.SevenZOutputFile.closeArchiveEntry(SevenZOutputFile.java:125)
{code}
Actually there is no need to explicitly finish the wrapped stream as XZ for
Java's LZMA2OutputStream which is returned by LZMA2Options#getOutputStream wll
internally finish the stream when close is called.
--
This message was sent by Atlassian JIRA
(v6.1#6144)