commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1572837 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java
Date Fri, 28 Feb 2014 06:03:29 GMT
Author: bodewig
Date: Fri Feb 28 06:03:28 2014
New Revision: 1572837

URL: http://svn.apache.org/r1572837
Log:
7z doesn't use the single byte id for 7z archives but only for XZ streams

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java?rev=1572837&r1=1572836&r2=1572837&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZMethod.java
Fri Feb 28 06:03:28 2014
@@ -42,18 +42,12 @@ public enum SevenZMethod {
      * BCJ x86 version 1.
      * @since 1.8
      */
-    X86(new byte[] { 0x03, 0x03, 0x01, 0x03 }, new byte[] { 0x04 });
+    X86(new byte[] { 0x03, 0x03, 0x01, 0x03 });
 
     private final byte[] id;
-    private final byte[] alternativeId;
 
     private SevenZMethod(byte[] id) {
-        this(id, null);
-    }
-
-    private SevenZMethod(byte[] id, byte[] alternativeId) {
         this.id = id;
-        this.alternativeId = alternativeId;
     }
 
     byte[] getId() {
@@ -64,8 +58,7 @@ public enum SevenZMethod {
 
     static SevenZMethod byId(byte[] id) {
         for (SevenZMethod m : SevenZMethod.class.getEnumConstants()) {
-            if (Arrays.equals(m.id, id)
-                || (m.alternativeId != null && Arrays.equals(m.alternativeId, id)))
{
+            if (Arrays.equals(m.id, id)) {
                 return m;
             }
         }



Mime
View raw message