cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r887068 - in /incubator/cassandra/trunk/src/java/org/apache/cassandra: dht/CollatingOrderPreservingPartitioner.java utils/FBUtilities.java
Date Fri, 04 Dec 2009 05:30:38 GMT
Author: jbellis
Date: Fri Dec  4 05:30:38 2009
New Revision: 887068

URL: http://svn.apache.org/viewvc?rev=887068&view=rev
Log:
r/m method that duplicates Arrays.equals.  patch by jbellis

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/CollatingOrderPreservingPartitioner.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/CollatingOrderPreservingPartitioner.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/CollatingOrderPreservingPartitioner.java?rev=887068&r1=887067&r2=887068&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/CollatingOrderPreservingPartitioner.java
(original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/CollatingOrderPreservingPartitioner.java
Fri Dec  4 05:30:38 2009
@@ -24,7 +24,6 @@
 import java.util.Locale;
 import java.util.Random;
 
-import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.db.DecoratedKey;
 import org.apache.cassandra.utils.FBUtilities;
 
@@ -84,7 +83,7 @@
         else
         {
             // wrapping range must involve the minimum token
-            assert FBUtilities.isEqualBits(MINIMUM.token, rbytes);
+            assert Arrays.equals(MINIMUM.token, rbytes);
 
             inlength = Math.max(lbytes.length, 1);
             if (lbytes.length < inlength)

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java?rev=887068&r1=887067&r2=887068&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java Fri Dec
 4 05:30:38 2009
@@ -95,11 +95,6 @@
         return n;
     }
 
-    public static boolean isEqualBits(byte[] bytes1, byte[] bytes2)
-    {
-        return 0 == compareByteArrays(bytes1, bytes2);
-    }
-
     public static int compareByteArrays(byte[] bytes1, byte[] bytes2){
         if(null == bytes1){
             if(null == bytes2) return 0;



Mime
View raw message