manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1549519 - /manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
Date Mon, 09 Dec 2013 09:19:18 GMT
Author: kwright
Date: Mon Dec  9 09:19:18 2013
New Revision: 1549519

URL: http://svn.apache.org/r1549519
Log:
Fix an unpacking bug

Modified:
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java?rev=1549519&r1=1549518&r2=1549519&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/connectorpool/ConnectorPool.java
Mon Dec  9 09:19:18 2013
@@ -734,9 +734,9 @@ public abstract class ConnectorPool<T ex
     if (data == null || data.length != 8)
       return 0;
     return ((int)data[0]) & 0xff +
-      (((int)data[1]) >> 8) & 0xff +
-      (((int)data[2]) >> 16) & 0xff +
-      (((int)data[3]) >> 24) & 0xff;
+      (((int)data[1]) << 8) & 0xff00 +
+      (((int)data[2]) << 16) & 0xff0000 +
+      (((int)data[3]) << 24) & 0xff000000;
   }
 
   protected static int unpackInUse(byte[] data)
@@ -744,9 +744,9 @@ public abstract class ConnectorPool<T ex
     if (data == null || data.length != 8)
       return 0;
     return ((int)data[4]) & 0xff +
-      (((int)data[5]) >> 8) & 0xff +
-      (((int)data[6]) >> 16) & 0xff +
-      (((int)data[7]) >> 24) & 0xff;
+      (((int)data[5]) << 8) & 0xff00 +
+      (((int)data[6]) << 16) & 0xff0000 +
+      (((int)data[7]) << 24) & 0xff000000;
   }
 
   protected static byte[] pack(int target, int inUse)



Mime
View raw message