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:18:25 UTC

svn commit: r1653058 - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/spatial/ lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java

Author: dsmiley
Date: Mon Jan 19 17:18:24 2015
New Revision: 1653058

URL: http://svn.apache.org/r1653058
Log:
LUCENE-6181: spatial pointsOnly check bug

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/lucene/   (props changed)
    lucene/dev/branches/branch_5x/lucene/spatial/   (props changed)
    lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java

Modified: lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java?rev=1653058&r1=1653057&r2=1653058&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java (original)
+++ lucene/dev/branches/branch_5x/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java Mon Jan 19 17:18:24 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);