accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [2/2] accumulo git commit: Merge branch '1.6' into 1.7
Date Wed, 20 Jan 2016 00:06:05 GMT
Merge branch '1.6' into 1.7


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

Branch: refs/heads/1.7
Commit: c9c60d37c4db4362d5af5e3a22eb3f78600bafec
Parents: a4a1d6e a2c2d38
Author: Keith Turner <kturner@apache.org>
Authored: Tue Jan 19 15:59:13 2016 -0500
Committer: Keith Turner <kturner@apache.org>
Committed: Tue Jan 19 15:59:13 2016 -0500

----------------------------------------------------------------------
 .../core/util/UnsynchronizedBuffer.java         |  4 +-
 .../core/util/UnsynchronizedBufferTest.java     | 56 ++++++++++++++++++++
 2 files changed, 58 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c9c60d37/core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
index e07ee10,f353613..46167ab
--- a/core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/UnsynchronizedBuffer.java
@@@ -181,15 -117,9 +181,15 @@@ public class UnsynchronizedBuffer 
        this.data = b;
      }
  
 +    /**
 +     * Creates a new reader.
 +     *
 +     * @param buffer
 +     *          byte buffer containing bytes to read
 +     */
      public Reader(ByteBuffer buffer) {
-       if (buffer.hasArray()) {
-         offset = buffer.arrayOffset();
+       if (buffer.hasArray() && buffer.array().length == buffer.arrayOffset() + buffer.limit())
{
+         offset = buffer.arrayOffset() + buffer.position();
          data = buffer.array();
        } else {
          data = new byte[buffer.remaining()];


Mime
View raw message