accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] accumulo git commit: ACCUMULO-4017 prevent bit extension from making byte values negative indexes
Date Tue, 13 Oct 2015 19:49:53 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 40a874341 -> 036e739ba


ACCUMULO-4017 prevent bit extension from making byte values negative indexes


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

Branch: refs/heads/master
Commit: a689f3ac0a89f628741e1eb1ae01d76bac2ebb72
Parents: 29c7eeb
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Tue Oct 13 15:48:35 2015 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Tue Oct 13 15:48:35 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/core/iterators/user/GrepIterator.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a689f3ac/core/src/main/java/org/apache/accumulo/core/iterators/user/GrepIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/user/GrepIterator.java
b/core/src/main/java/org/apache/accumulo/core/iterators/user/GrepIterator.java
index d3efe2f..30d27ae 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/user/GrepIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/GrepIterator.java
@@ -59,7 +59,7 @@ public class GrepIterator extends Filter {
       skip = 0;
       for (int j = M - 1; j >= 0; j--) {
         if (term[j] != value[i + j]) {
-          skip = Math.max(1, j - right[value[i + j]]);
+          skip = Math.max(1, j - right[value[i + j] & 0xff]);
         }
       }
       if (skip == 0) {


Mime
View raw message