cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/2] git commit: Fix typos
Date Thu, 20 Feb 2014 20:12:57 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 76e5c93fb -> 13b753b01


Fix typos


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

Branch: refs/heads/cassandra-2.1
Commit: edf16c950dadcf2b75c8faed33269881b58b1de6
Parents: b09d876
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu Feb 20 21:11:33 2014 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Feb 20 21:11:33 2014 +0100

----------------------------------------------------------------------
 .../org/apache/cassandra/db/marshal/AbstractCompositeType.java     | 2 ++
 src/java/org/apache/cassandra/db/marshal/LongType.java             | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf16c95/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
index 9250b0f..c789d9b 100644
--- a/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
+++ b/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
@@ -76,6 +76,8 @@ public abstract class AbstractCompositeType extends AbstractType<ByteBuffer>
     {
         if (o1 == null || !o1.hasRemaining())
             return o2 == null || !o2.hasRemaining() ? 0 : -1;
+        if (o2 == null || !o2.hasRemaining())
+            return 1;
 
         ByteBuffer bb1 = o1.duplicate();
         ByteBuffer bb2 = o2.duplicate();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf16c95/src/java/org/apache/cassandra/db/marshal/LongType.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/marshal/LongType.java b/src/java/org/apache/cassandra/db/marshal/LongType.java
index 142683d..9ad078e 100644
--- a/src/java/org/apache/cassandra/db/marshal/LongType.java
+++ b/src/java/org/apache/cassandra/db/marshal/LongType.java
@@ -47,7 +47,7 @@ public class LongType extends AbstractType<Long>
             return 1;
         }
 
-        int diff = o1.get(o1.position() + o1.arrayOffset()) - o2.get(o2.position() + o2.arrayOffset());
+        int diff = o1.get(o1.position()) - o2.get(o2.position());
         if (diff != 0)
             return diff;
 


Mime
View raw message