You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2013/10/27 18:43:14 UTC

svn commit: r1536169 - in /commons/proper/compress/trunk/src: changes/changes.xml main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java

Author: bodewig
Date: Sun Oct 27 17:43:14 2013
New Revision: 1536169

URL: http://svn.apache.org/r1536169
Log:
COMPRESS-241 SevenZOutputFile#closeArchiveEntry throws XZException on Java8

Modified:
    commons/proper/compress/trunk/src/changes/changes.xml
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java

Modified: commons/proper/compress/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/changes/changes.xml?rev=1536169&r1=1536168&r2=1536169&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/changes/changes.xml (original)
+++ commons/proper/compress/trunk/src/changes/changes.xml Sun Oct 27 17:43:14 2013
@@ -44,6 +44,10 @@ The <action> type attribute can be add,u
   <body>
     <release version="1.7" date="not released, yet"
              description="Release 1.7">
+      <action issue="COMPRESS-241" type="fix" date="2012-03-27">
+        SevenZOutputFile#closeArchiveEntry throws an exception when
+        using LZMA2 compression on Java8.
+      </action> 
     </release>
     <release version="1.6" date="2013-10-26"
              description="Release 1.6">

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java?rev=1536169&r1=1536168&r2=1536169&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/LZMA2Decoder.java Sun Oct 27 17:43:14 2013
@@ -52,19 +52,7 @@ class LZMA2Decoder extends Coders.CoderB
         LZMA2Options options = new LZMA2Options();
         options.setDictSize(LZMA2Options.DICT_SIZE_DEFAULT);
         FinishableOutputStream wrapped = new FinishableWrapperOutputStream(out);
-        return new FinishOnCloseStream(options.getOutputStream(wrapped));
+        return options.getOutputStream(wrapped);
     }
 
-    private static class FinishOnCloseStream extends FilterOutputStream {
-
-        private FinishOnCloseStream(FinishableOutputStream out) {
-            super(out);
-        }
-
-        @Override
-        public void close() throws IOException {
-            ((FinishableOutputStream) out).finish();
-            super.close();
-        }
-    }
 }