jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1527568 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java
Date Mon, 30 Sep 2013 13:51:41 GMT
Author: ard
Date: Mon Sep 30 13:51:41 2013
New Revision: 1527568

URL: http://svn.apache.org/r1527568
Log:
JCR-3673 make sure indexIsValid never gets called with NO_MORE_DOCS

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java?rev=1527568&r1=1527567&r2=1527568&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java
Mon Sep 30 13:51:41 2013
@@ -430,12 +430,13 @@ class ChildAxisQuery extends Query imple
 
             calculateChildren();
             nextDoc = hits.skipTo(target);
-            while (nextDoc > -1 && !indexIsValid(nextDoc)) {
-                nextDoc();
-            }
             if (nextDoc < 0) {
                 nextDoc = NO_MORE_DOCS;
             }
+
+            while (nextDoc != NO_MORE_DOCS && !indexIsValid(nextDoc)) {
+                nextDoc();
+            }
             return nextDoc;
         }
 



Mime
View raw message