Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-241

writing 7z entries with LZMA2 fails when closing the stream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.7
    • Archivers

    Description

      closing archive entries that use LZMA2 compression fails on JDK8 early access build 113 due to:

      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)
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bodewig Stefan Bodewig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: