You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ho...@apache.org on 2009/01/25 02:34:21 UTC

svn commit: r737464 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/util/SolrPluginUtils.java

Author: hossman
Date: Sun Jan 25 01:34:21 2009
New Revision: 737464

URL: http://svn.apache.org/viewvc?rev=737464&view=rev
Log:
SOLR-970: Use an ArrayList since we know exactly how long the List will be in advance

Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=737464&r1=737463&r2=737464&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Sun Jan 25 01:34:21 2009
@@ -154,6 +154,9 @@
     Controllable via the facet.method parameter - "fc" is the new default method and "enum"
     is the original method.  (yonik)
 
+ 4. SOLR-970: Use an ArrayList in SolrPluginUtils.parseQueryStrings
+    since we know exactly how long the List will be in advance.
+    (Kay Kay via hossman)
 
 Bug Fixes
 ----------------------

Modified: lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java?rev=737464&r1=737463&r2=737464&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/util/SolrPluginUtils.java Sun Jan 25 01:34:21 2009
@@ -848,7 +848,7 @@
   public static List<Query> parseQueryStrings(SolrQueryRequest req, 
                                               String[] queries) throws ParseException {    
     if (null == queries || 0 == queries.length) return null;
-    List<Query> out = new LinkedList<Query>();
+    List<Query> out = new ArrayList<Query>(queries.length);
     for (String q : queries) {
       if (null != q && 0 != q.trim().length()) {
         out.add(QParser.getParser(q, null, req).getQuery());