cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [02/10] git commit: use long math on deserialize as well patch by Taylan Develioglu; reviewed by jbellis for CASSANDRA-5903
Date Wed, 21 Aug 2013 17:31:58 GMT
use long math on deserialize as well
patch by Taylan Develioglu; reviewed by jbellis for CASSANDRA-5903


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/572cddc3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/572cddc3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/572cddc3

Branch: refs/heads/cassandra-2.0.0
Commit: 572cddc3008780a1ea08ffaaa468821e42ab7100
Parents: dd65e88
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Aug 21 12:30:08 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Aug 21 12:30:29 2013 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/572cddc3/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
index b7bb733..fb32043 100644
--- a/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
+++ b/src/java/org/apache/cassandra/utils/obs/OffHeapBitSet.java
@@ -119,9 +119,9 @@ public class OffHeapBitSet implements IBitSet
 
     public static OffHeapBitSet deserialize(DataInput dis) throws IOException
     {
-        int byteCount = dis.readInt() * 8;
+        long byteCount = dis.readInt() * 8L;
         Memory memory = RefCountedMemory.allocate(byteCount);
-        for (int i = 0; i < byteCount;)
+        for (long i = 0; i < byteCount;)
         {
             long v = dis.readLong();
             memory.setByte(i++, (byte) (v >>> 0));


Mime
View raw message