Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.0 fd52a88bd -> 9dd598f1c
PHOENIX-2620 NPE in org.apache.phoenix.expression.util.regex.JavaPattern.matches(Nicolas Liochon) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/9dd598f1 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/9dd598f1 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/9dd598f1 Branch: refs/heads/4.x-HBase-1.0 Commit: 9dd598f1c4745f0bf7e7607f541fc4023654e959 Parents: fd52a88 Author: Samarth <[email protected]> Authored: Wed Feb 3 13:14:53 2016 -0800 Committer: Samarth <[email protected]> Committed: Wed Feb 3 13:14:53 2016 -0800 ---------------------------------------------------------------------- .../java/org/apache/phoenix/expression/util/regex/JavaPattern.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/9dd598f1/phoenix-core/src/main/java/org/apache/phoenix/expression/util/regex/JavaPattern.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/expression/util/regex/JavaPattern.java b/phoenix-core/src/main/java/org/apache/phoenix/expression/util/regex/JavaPattern.java index 707bced..ccdb5af 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/expression/util/regex/JavaPattern.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/expression/util/regex/JavaPattern.java @@ -47,7 +47,7 @@ public class JavaPattern extends AbstractBasePattern { public void matches(ImmutableBytesWritable srcPtr) { Preconditions.checkNotNull(srcPtr); String matcherSourceStr = (String) PVarchar.INSTANCE.toObject(srcPtr); - if (srcPtr.get().length == 0 && matcherSourceStr == null) matcherSourceStr = ""; + if (srcPtr.getLength() == 0 && matcherSourceStr == null) matcherSourceStr = ""; boolean ret = pattern.matcher(matcherSourceStr).matches(); srcPtr.set(ret ? PDataType.TRUE_BYTES : PDataType.FALSE_BYTES); }
