cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1069155 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/ByteBufferUtil.java
Date Wed, 09 Feb 2011 22:48:03 GMT
Author: brandonwilliams
Date: Wed Feb  9 22:48:03 2011
New Revision: 1069155

URL: http://svn.apache.org/viewvc?rev=1069155&view=rev
Log:
ByteBufferUtil.string should return the copy, not the original buffer.

Modified:
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/ByteBufferUtil.java

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/ByteBufferUtil.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/ByteBufferUtil.java?rev=1069155&r1=1069154&r2=1069155&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/ByteBufferUtil.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/utils/ByteBufferUtil.java
Wed Feb  9 22:48:03 2011
@@ -116,7 +116,7 @@ public class ByteBufferUtil
         ByteBuffer copy = buffer.duplicate();
         copy.position(position);
         copy.limit(copy.position() + length);
-        return string(buffer, charset);
+        return string(copy, charset);
     }
 
     public static String string(ByteBuffer buffer, Charset charset) throws CharacterCodingException



Mime
View raw message