commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1552768 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
Date Fri, 20 Dec 2013 18:05:02 GMT
Author: ggregory
Date: Fri Dec 20 18:05:02 2013
New Revision: 1552768

URL: http://svn.apache.org/r1552768
Log:
Revert some paren changes.

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

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java?rev=1552768&r1=1552767&r2=1552768&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
Fri Dec 20 18:05:02 2013
@@ -625,7 +625,7 @@ public class SevenZFile implements Close
                     if (external != 0) {
                         throw new IOException("Not implemented");
                     } else {
-                        if ((size - 1 & 1) != 0) {
+                        if (((size - 1) & 1) != 0) {
                             throw new IOException("File names length invalid");
                         }
                         final byte[] names = new byte[(int)(size - 1)];
@@ -902,10 +902,10 @@ public class SevenZFile implements Close
         long value = 0;
         for (int i = 0; i < 8; i++) {
             if ((firstByte & mask) == 0) {
-                return value | (firstByte & mask - 1) << 8 * i;
+                return value | ((firstByte & (mask - 1)) << (8 * i));
             }
             long nextByte = in.readUnsignedByte();
-            value |= nextByte << 8 * i;
+            value |= (nextByte << (8 * i));
             mask >>>= 1;
         }
         return value;



Mime
View raw message