jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1378487 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DescendantSelfAxisQuery.java
Date Wed, 29 Aug 2012 09:14:43 GMT
Author: alexparvulescu
Date: Wed Aug 29 09:14:43 2012
New Revision: 1378487

URL: http://svn.apache.org/viewvc?rev=1378487&view=rev
Log:
JCR-3407 CaseTermQuery #rewrite behavior changes

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DescendantSelfAxisQuery.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DescendantSelfAxisQuery.java?rev=1378487&r1=1378486&r2=1378487&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DescendantSelfAxisQuery.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DescendantSelfAxisQuery.java
Wed Aug 29 09:14:43 2012
@@ -529,12 +529,14 @@ class DescendantSelfAxisQuery extends Qu
         private void collectContextHits() throws IOException {
             if (!contextHitsCalculated) {
                 long time = System.currentTimeMillis();
-                contextScorer.score(new AbstractHitCollector() {
-                    @Override
-                    protected void collect(int doc, float score) {
-                        contextHits.set(doc);
-                    }
-                }); // find all
+                if (contextScorer != null) {
+                    contextScorer.score(new AbstractHitCollector() {
+                        @Override
+                        protected void collect(int doc, float score) {
+                            contextHits.set(doc);
+                        }
+                    }); // find all
+                }
                 contextHitsCalculated = true;
                 time = System.currentTimeMillis() - time;
                 if (log.isDebugEnabled()) {



Mime
View raw message