Author: jbellis
Date: Fri Mar  4 06:45:10 2011
New Revision: 1077830

URL: http://svn.apache.org/viewvc?rev=1077830&view=rev
Log:
r/m unnecessary BBU.clone calls
patch by jbellis; reviewed by tjake for CASSANDRA-2271

Modified:
    
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
    
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/FBUtilities.java

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/sstable/SSTableReader.java?rev=1077830&r1=1077829&r2=1077830&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
 Fri Mar  4 06:45:10 2011
@@ -301,7 +301,7 @@ public class SSTableReader extends SSTab
                 long dataPosition = input.readLong();
                 if (key != null)
                 {
-                    DecoratedKey decoratedKey = decodeKey(partitioner, 
descriptor, ByteBufferUtil.clone(key));
+                    DecoratedKey decoratedKey = decodeKey(partitioner, 
descriptor, key);
                     if (recreatebloom)
                         bf.add(decoratedKey.key);
                     if (shouldAddEntry)

Modified: 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/FBUtilities.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/FBUtilities.java?rev=1077830&r1=1077829&r2=1077830&view=diff
==============================================================================
--- 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/FBUtilities.java
 (original)
+++ 
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/FBUtilities.java
 Fri Mar  4 06:45:10 2011
@@ -235,7 +235,7 @@ public class FBUtilities
         MessageDigest messageDigest = localMD5Digest.get();
         for(ByteBuffer block : data)
         {
-            messageDigest.update(ByteBufferUtil.clone(block));
+            messageDigest.update(block.duplicate());
         }
 
         return messageDigest.digest();


Reply via email to