You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rj...@apache.org on 2016/03/20 21:46:07 UTC
lucene-solr:branch_6_0: LUCENE-7118: Fix packed points upper/lower
bound length check
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6_0 d8c4e6977 -> d92561e6e
LUCENE-7118: Fix packed points upper/lower bound length check
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/d92561e6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d92561e6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d92561e6
Branch: refs/heads/branch_6_0
Commit: d92561e6ed0dad5cbd0488a05f2cea569ff6d5e3
Parents: d8c4e69
Author: Ryan Ernst <rj...@apache.org>
Authored: Sun Mar 20 13:34:22 2016 -0700
Committer: Ryan Ernst <rj...@apache.org>
Committed: Sun Mar 20 13:45:57 2016 -0700
----------------------------------------------------------------------
.../core/src/java/org/apache/lucene/search/PointRangeQuery.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d92561e6/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java b/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
index 37580e0..d798c22 100644
--- a/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
@@ -68,9 +68,12 @@ public abstract class PointRangeQuery extends Query {
if (lowerPoint.length % numDims != 0) {
throw new IllegalArgumentException("lowerPoint is not a fixed multiple of numDims");
}
- if (upperPoint.length != upperPoint.length) {
+ if (lowerPoint.length != upperPoint.length) {
throw new IllegalArgumentException("lowerPoint has length=" + numDims + " but upperPoint has different length=" + upperPoint.length);
}
+ if (numDims <= 0) {
+ throw new IllegalArgumentException("numDims must be positive, got " + numDims);
+ }
this.numDims = numDims;
this.bytesPerDim = lowerPoint.length / numDims;