ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1056064 - in /ant/ivy/core/trunk: src/java/org/apache/ivy/osgi/obr/filter/RequirementFilterParser.java test/java/org/apache/ivy/osgi/obr/RequirementFilterTest.java
Date Thu, 06 Jan 2011 20:40:19 GMT
Author: hibou
Date: Thu Jan  6 20:40:19 2011
New Revision: 1056064

URL: http://svn.apache.org/viewvc?rev=1056064&view=rev
Log:
Better handle spaces

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/filter/RequirementFilterParser.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/obr/RequirementFilterTest.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/filter/RequirementFilterParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/filter/RequirementFilterParser.java?rev=1056064&r1=1056063&r2=1056064&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/filter/RequirementFilterParser.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/obr/filter/RequirementFilterParser.java
Thu Jan  6 20:40:19 2011
@@ -171,6 +171,7 @@ public class RequirementFilterParser {
 
         private void parseMultiOperator(MultiOperatorFilter filter) throws ParseException
{
             do {
+                skipWhiteSpace();
                 readNext();
                 if (c == '(') {
                     unread();
@@ -180,7 +181,7 @@ public class RequirementFilterParser {
                 }
             } while (pos < length);
             if (filter.getSubFilters().size() == 0) {
-                throw new ParseException("Expecting at least on sub filter", pos);
+                throw new ParseException("Expecting at least one sub filter", pos);
             }
         }
 

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/obr/RequirementFilterTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/obr/RequirementFilterTest.java?rev=1056064&r1=1056063&r2=1056064&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/obr/RequirementFilterTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/obr/RequirementFilterTest.java Thu Jan
 6 20:40:19 2011
@@ -46,6 +46,8 @@ public class RequirementFilterTest exten
         RequirementFilter and2 = new AndFilter(new RequirementFilter[] {cgt2, twoeqd,
                 foodorbarge0dot0});
         checkParse(and2, "(&(c>2)(2=d)(foo.bar>=0.0))");
+        RequirementFilter spaceAfterAnd = new AndFilter(new RequirementFilter[] {twoeqd});
+        checkParse(spaceAfterAnd, "(& (2=d))");
     }
 
     private void assertParseFail(String toParse) {



Mime
View raw message