From 2028a88d4f07fa52f29dcc7e298efbb8d6448d9e Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Sun, 25 Sep 2011 14:10:42 +0000 Subject: [PATCH] add assert git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1175397 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/lucene/search/join/BlockJoinQuery.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/join/src/java/org/apache/lucene/search/join/BlockJoinQuery.java b/modules/join/src/java/org/apache/lucene/search/join/BlockJoinQuery.java index 45e51a4293f..6ce71a6448f 100644 --- a/modules/join/src/java/org/apache/lucene/search/join/BlockJoinQuery.java +++ b/modules/join/src/java/org/apache/lucene/search/join/BlockJoinQuery.java @@ -322,6 +322,9 @@ public class BlockJoinQuery extends Query { return parentDoc = NO_MORE_DOCS; } + // Every parent must have at least one child: + assert parentTarget != 0; + final int prevParentDoc = parentBits.prevSetBit(parentTarget-1); //System.out.println(" rolled back to prevParentDoc=" + prevParentDoc + " vs parentDoc=" + parentDoc);