cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1070992 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/MappedFileDataInput.java
Date Tue, 15 Feb 2011 18:05:17 GMT
Author: jbellis
Date: Tue Feb 15 18:05:17 2011
New Revision: 1070992

URL: http://svn.apache.org/viewvc?rev=1070992&view=rev
Log:
use duplicate() to indicate that we're not modifying BB.position
patch by jbellis

Modified:
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/MappedFileDataInput.java

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/MappedFileDataInput.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/MappedFileDataInput.java?rev=1070992&r1=1070991&r2=1070992&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/MappedFileDataInput.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/MappedFileDataInput.java
Tue Feb 15 18:05:17 2011
@@ -118,7 +118,7 @@ public class MappedFileDataInput extends
         assert length <= remaining
                 : String.format("mmap segment underflow; remaining is %d but %d requested",
remaining, length);
 
-        ByteBuffer bytes = buffer.slice();
+        ByteBuffer bytes = buffer.duplicate();
         bytes.position(buffer.position() + position).limit(buffer.position() + position +
length);
         position += length;
 



Mime
View raw message