lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject svn commit: r713634 - /lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java
Date Thu, 13 Nov 2008 04:23:07 GMT
Author: otis
Date: Wed Nov 12 20:23:05 2008
New Revision: 713634

URL: http://svn.apache.org/viewvc?rev=713634&view=rev
Log:
LUCENE-711 - initialize List with correct size

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java?rev=713634&r1=713633&r2=713634&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/BooleanQuery.java Wed Nov 12 20:23:05
2008
@@ -175,11 +175,12 @@
 
   private class BooleanWeight implements Weight {
     protected Similarity similarity;
-    protected ArrayList weights = new ArrayList();
+    protected ArrayList weights;
 
     public BooleanWeight(Searcher searcher)
       throws IOException {
       this.similarity = getSimilarity(searcher);
+      weights = new ArrayList(clauses.size());
       for (int i = 0 ; i < clauses.size(); i++) {
         BooleanClause c = (BooleanClause)clauses.get(i);
         weights.add(c.getQuery().createWeight(searcher));



Mime
View raw message