mirror of https://github.com/apache/lucene.git
LUCENE-7118: Fix packed points upper/lower bound length check
This commit is contained in:
parent
e1a1dbfabc
commit
54e662b6da
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue