jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r602856 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DescendantSelfAxisQuery.java
Date Mon, 10 Dec 2007 10:48:17 GMT
Author: mreutegg
Date: Mon Dec 10 02:48:15 2007
New Revision: 602856

URL: http://svn.apache.org/viewvc?rev=602856&view=rev
Log:
JCR-1251: DescendantSelfAxisQuery creates too many object instances

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=602856&r1=602855&r2=602856&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
Mon Dec 10 02:48:15 2007
@@ -26,11 +26,7 @@
 import org.apache.lucene.search.Weight;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.BitSet;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Set;
 
 /**
@@ -231,6 +227,11 @@
         private boolean contextHitsCalculated = false;
 
         /**
+         * Remember document numbers of ancestors during validation
+         */
+        private int[] ancestorDocs = new int[2];
+
+        /**
          * Creates a new <code>DescendantSelfAxisScorer</code>.
          *
          * @param similarity the <code>Similarity</code> instance to use.
@@ -339,7 +340,6 @@
             int parentDoc = hResolver.getParent(doc);
 
             int ancestorCount = 0;
-            int[] ancestorDocs = new int[2];
             ancestorDocs[ancestorCount++] = parentDoc;
 
             // traverse



Mime
View raw message