commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1617211 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
Date Mon, 11 Aug 2014 07:44:17 GMT
Author: bodewig
Date: Mon Aug 11 07:44:16 2014
New Revision: 1617211

URL: http://svn.apache.org/r1617211
Log:
COMPRESS-285 check for XZ last

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java?rev=1617211&r1=1617210&r2=1617211&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
Mon Aug 11 07:44:16 2014
@@ -174,11 +174,6 @@ public class CompressorStreamFactory {
                 return new GzipCompressorInputStream(in, decompressConcatenated);
             }
 
-            if (XZUtils.isXZCompressionAvailable() &&
-                XZCompressorInputStream.matches(signature, signatureLength)) {
-                return new XZCompressorInputStream(in, decompressConcatenated);
-            }
-
             if (Pack200CompressorInputStream.matches(signature, signatureLength)) {
                 return new Pack200CompressorInputStream(in);
             }
@@ -191,6 +186,11 @@ public class CompressorStreamFactory {
                 return new ZCompressorInputStream(in);
             }
 
+            if (XZUtils.isXZCompressionAvailable() &&
+                XZCompressorInputStream.matches(signature, signatureLength)) {
+                return new XZCompressorInputStream(in, decompressConcatenated);
+            }
+
         } catch (IOException e) {
             throw new CompressorException("Failed to detect Compressor from InputStream.",
e);
         }



Mime
View raw message