jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r631619 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ParentAxisQuery.java
Date Wed, 27 Feb 2008 15:43:06 GMT
Author: mreutegg
Date: Wed Feb 27 07:43:05 2008
New Revision: 631619

URL: http://svn.apache.org/viewvc?rev=631619&view=rev
Log:
JCR-1427: XPath query with child axis predicates

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ParentAxisQuery.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ParentAxisQuery.java?rev=631619&r1=631618&r2=631619&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ParentAxisQuery.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ParentAxisQuery.java
Wed Feb 27 07:43:05 2008
@@ -309,7 +309,16 @@
                     try {
                         for (int i = hits.nextSetBit(0); i >= 0; i = hits.nextSetBit(i
+ 1)) {
                             if (!tDocs.skipTo(i)) {
-                                hits.clear(i);
+                                // no more name tests, clear remaining
+                                hits.clear(i, hits.length());
+                            } else {
+                                // assert doc >= i
+                                int doc = tDocs.doc();
+                                if (doc > i) {
+                                    // clear hits
+                                    hits.clear(i, doc);
+                                    i = doc;
+                                }
                             }
                         }
                     } finally {



Mime
View raw message