SOLR-970: Use an ArrayList since we know exactly how long the List will be in advance

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@737464 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2009-01-25 01:34:21 +00:00
parent 25736d341b
commit 68b72fc830
2 changed files with 4 additions and 1 deletions

View File

@ -154,6 +154,9 @@ Optimizations
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
----------------------

View File

@ -848,7 +848,7 @@ public class SolrPluginUtils {
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());