You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2015/06/12 18:54:06 UTC

[1/5] accumulo git commit: ACCUMULO-3900 Fix Lexicoder precondition check and bad test.

Repository: accumulo
Updated Branches:
  refs/heads/1.7 699b8bf06 -> 341034a56
  refs/heads/master 844166a05 -> 5eede28e0


ACCUMULO-3900 Fix Lexicoder precondition check and bad test.


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

Branch: refs/heads/1.7
Commit: 246129f1b2155f1abc4f8a0f2213a2f14aae6135
Parents: 699b8bf
Author: Dylan Hutchison <dh...@mit.edu>
Authored: Thu Jun 11 20:12:08 2015 -0400
Committer: Dylan Hutchison <dh...@mit.edu>
Committed: Fri Jun 12 02:28:40 2015 -0400

----------------------------------------------------------------------
 .../apache/accumulo/core/client/lexicoder/AbstractEncoder.java  | 2 +-
 .../core/client/lexicoder/impl/AbstractLexicoderTest.java       | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/246129f1/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
index 6ba7e02..d776329 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
@@ -51,7 +51,7 @@ public abstract class AbstractEncoder<T> implements Encoder<T> {
     Preconditions.checkNotNull(b, "cannot decode null byte array");
     Preconditions.checkArgument(offset >= 0, "offset %s cannot be negative", offset);
     Preconditions.checkArgument(len >= 0, "length %s cannot be negative", len);
-    Preconditions.checkArgument(offset + len < b.length, "offset + length %s exceeds byte array length %s", (offset + len), b.length);
+    Preconditions.checkArgument(offset + len <= b.length, "offset + length %s exceeds byte array length %s", (offset + len), b.length);
 
     return decodeUnchecked(b, offset, len);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/246129f1/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java
index d695ce9..d0f7571 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java
@@ -78,11 +78,6 @@ public abstract class AbstractLexicoderTest extends LexicoderTest {
     } catch (IllegalArgumentException e) {}
 
     try {
-      lexicoder.decode(encoded, encoded.length, 0);
-      fail("Should throw on offset==length.");
-    } catch (IllegalArgumentException e) {}
-
-    try {
       lexicoder.decode(encoded, 0, -1);
       fail("Should throw on negative length.");
     } catch (IllegalArgumentException e) {}


[2/5] accumulo git commit: ACCUMULO-3900 Fix Lexicoder precondition check and bad test.

Posted by ct...@apache.org.
ACCUMULO-3900 Fix Lexicoder precondition check and bad test.


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

Branch: refs/heads/master
Commit: 246129f1b2155f1abc4f8a0f2213a2f14aae6135
Parents: 699b8bf
Author: Dylan Hutchison <dh...@mit.edu>
Authored: Thu Jun 11 20:12:08 2015 -0400
Committer: Dylan Hutchison <dh...@mit.edu>
Committed: Fri Jun 12 02:28:40 2015 -0400

----------------------------------------------------------------------
 .../apache/accumulo/core/client/lexicoder/AbstractEncoder.java  | 2 +-
 .../core/client/lexicoder/impl/AbstractLexicoderTest.java       | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/246129f1/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
index 6ba7e02..d776329 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/AbstractEncoder.java
@@ -51,7 +51,7 @@ public abstract class AbstractEncoder<T> implements Encoder<T> {
     Preconditions.checkNotNull(b, "cannot decode null byte array");
     Preconditions.checkArgument(offset >= 0, "offset %s cannot be negative", offset);
     Preconditions.checkArgument(len >= 0, "length %s cannot be negative", len);
-    Preconditions.checkArgument(offset + len < b.length, "offset + length %s exceeds byte array length %s", (offset + len), b.length);
+    Preconditions.checkArgument(offset + len <= b.length, "offset + length %s exceeds byte array length %s", (offset + len), b.length);
 
     return decodeUnchecked(b, offset, len);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/246129f1/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java
index d695ce9..d0f7571 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/impl/AbstractLexicoderTest.java
@@ -78,11 +78,6 @@ public abstract class AbstractLexicoderTest extends LexicoderTest {
     } catch (IllegalArgumentException e) {}
 
     try {
-      lexicoder.decode(encoded, encoded.length, 0);
-      fail("Should throw on offset==length.");
-    } catch (IllegalArgumentException e) {}
-
-    try {
       lexicoder.decode(encoded, 0, -1);
       fail("Should throw on negative length.");
     } catch (IllegalArgumentException e) {}


[3/5] accumulo git commit: Merge remote-tracking branch 'dhutchis/ACCUMULO-3900' into 1.7

Posted by ct...@apache.org.
Merge remote-tracking branch 'dhutchis/ACCUMULO-3900' into 1.7

This closes #37


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

Branch: refs/heads/master
Commit: 341034a5655ad119ddf77125ed190e647f704e7d
Parents: 699b8bf 246129f
Author: Christopher Tubbs <ct...@apache.org>
Authored: Fri Jun 12 11:40:09 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Fri Jun 12 11:40:09 2015 -0400

----------------------------------------------------------------------
 .../apache/accumulo/core/client/lexicoder/AbstractEncoder.java  | 2 +-
 .../core/client/lexicoder/impl/AbstractLexicoderTest.java       | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------



[4/5] accumulo git commit: Merge remote-tracking branch 'dhutchis/ACCUMULO-3900' into 1.7

Posted by ct...@apache.org.
Merge remote-tracking branch 'dhutchis/ACCUMULO-3900' into 1.7

This closes #37


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

Branch: refs/heads/1.7
Commit: 341034a5655ad119ddf77125ed190e647f704e7d
Parents: 699b8bf 246129f
Author: Christopher Tubbs <ct...@apache.org>
Authored: Fri Jun 12 11:40:09 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Fri Jun 12 11:40:09 2015 -0400

----------------------------------------------------------------------
 .../apache/accumulo/core/client/lexicoder/AbstractEncoder.java  | 2 +-
 .../core/client/lexicoder/impl/AbstractLexicoderTest.java       | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------



[5/5] accumulo git commit: Merge branch '1.7'

Posted by ct...@apache.org.
Merge branch '1.7'


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

Branch: refs/heads/master
Commit: 5eede28e0dd0d00874c5f67a24de204226066ca0
Parents: 844166a 341034a
Author: Christopher Tubbs <ct...@apache.org>
Authored: Fri Jun 12 11:59:03 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Fri Jun 12 11:59:03 2015 -0400

----------------------------------------------------------------------
 .../apache/accumulo/core/client/lexicoder/AbstractEncoder.java  | 2 +-
 .../core/client/lexicoder/impl/AbstractLexicoderTest.java       | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------