From c562b10b2e43bfdbe5b5346965ac29c508089c30 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Tue, 28 Sep 2010 03:51:14 +0000 Subject: [PATCH] fix parsing of empty value source list git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1002002 13f79535-47bb-0310-9956-ffa450edef68 --- solr/src/java/org/apache/solr/search/FunctionQParser.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/solr/src/java/org/apache/solr/search/FunctionQParser.java b/solr/src/java/org/apache/solr/search/FunctionQParser.java index 7006675679c..a2312e1ab6d 100755 --- a/solr/src/java/org/apache/solr/search/FunctionQParser.java +++ b/solr/src/java/org/apache/solr/search/FunctionQParser.java @@ -214,9 +214,8 @@ public class FunctionQParser extends QParser { */ public List parseValueSourceList() throws ParseException { List sources = new ArrayList(3); - for (;;) { - sources.add(parseValueSource(false)); - if (! consumeArgumentDelimiter()) break; + while (hasMoreArguments()) { + sources.add(parseValueSource(true)); } return sources; }