You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2015/01/19 18:16:54 UTC
svn commit: r1653057 -
/lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java
Author: dsmiley
Date: Mon Jan 19 17:16:54 2015
New Revision: 1653057
URL: http://svn.apache.org/r1653057
Log:
LUCENE-6181: spatial pointsOnly check bug
Modified:
lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java
Modified: lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java?rev=1653057&r1=1653056&r2=1653057&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java (original)
+++ lucene/dev/trunk/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java Mon Jan 19 17:16:54 2015
@@ -147,8 +147,8 @@ public abstract class PrefixTreeStrategy
}
protected TokenStream createTokenStream(Shape shape, int detailLevel) {
- if (pointsOnly && shape instanceof Point) {
- throw new IllegalArgumentException("pointsOnly is true yet a point is given for indexing");
+ if (pointsOnly && !(shape instanceof Point)) {
+ throw new IllegalArgumentException("pointsOnly is true yet a " + shape.getClass() + " is given for indexing");
}
Iterator<Cell> cells = grid.getTreeCellIterator(shape, detailLevel);
return new CellTokenStream().setCells(cells);