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 2014/04/18 04:45:50 UTC

svn commit: r1588404 [2/2] - in /lucene/dev/trunk/lucene: ./ benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ spatial/src/java/org/apache/lucene/spatial/prefix/ spatial/src/java/org/apache/lucene/spatial/prefix/tree/ spatial/src/java/org/ap...

Modified: lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java?rev=1588404&r1=1588403&r2=1588404&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java (original)
+++ lucene/dev/trunk/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java Fri Apr 18 02:45:49 2014
@@ -61,7 +61,11 @@ public class SpatialPrefixTreeTest exten
     assertEquals(ctx.getWorldBounds(), c.getShape());
     while (c.getLevel() < trie.getMaxLevels()) {
       prevC = c;
-      List<Cell> subCells = new ArrayList<>(c.getSubCells());
+      List<Cell> subCells = new ArrayList<>();
+      CellIterator subCellsIter = c.getNextLevelCells(null);
+      while (subCellsIter.hasNext()) {
+        subCells.add(subCellsIter.next());
+      }
       c = subCells.get(random().nextInt(subCells.size()-1));
       
       assertEquals(prevC.getLevel()+1,c.getLevel());
@@ -73,7 +77,7 @@ public class SpatialPrefixTreeTest exten
     }
   }
   /**
-   * A PrefixTree pruning optimization gone bad.
+   * A PrefixTree pruning optimization gone bad, applicable when optimize=true.
    * See <a href="https://issues.apache.org/jira/browse/LUCENE-4770>LUCENE-4770</a>.
    */
   @Test