You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2011/08/30 17:46:18 UTC
svn commit: r1163265 - in /felix/trunk/framework/src:
main/java/org/apache/felix/framework/capabilityset/SimpleFilter.java
test/java/org/apache/felix/framework/capabilityset/SimpleFilterTest.java
Author: rickhall
Date: Tue Aug 30 15:46:18 2011
New Revision: 1163265
URL: http://svn.apache.org/viewvc?rev=1163265&view=rev
Log:
Substring parsing was incorrectly disallowing parentheses characters. (FELIX-2762)
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/SimpleFilter.java
felix/trunk/framework/src/test/java/org/apache/felix/framework/capabilityset/SimpleFilterTest.java
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/SimpleFilter.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/SimpleFilter.java?rev=1163265&r1=1163264&r2=1163265&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/SimpleFilter.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/SimpleFilter.java Tue Aug 30 15:46:18 2011
@@ -401,12 +401,7 @@ loop: for (;;)
// Read the next character and account for escapes.
char c = value.charAt(idx++);
- if (!escaped && ((c == '(') || (c == ')')))
- {
- throw new IllegalArgumentException(
- "Illegal value: " + value);
- }
- else if (!escaped && (c == '*'))
+ if (!escaped && (c == '*'))
{
if (wasStar)
{
Modified: felix/trunk/framework/src/test/java/org/apache/felix/framework/capabilityset/SimpleFilterTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/test/java/org/apache/felix/framework/capabilityset/SimpleFilterTest.java?rev=1163265&r1=1163264&r2=1163265&view=diff
==============================================================================
--- felix/trunk/framework/src/test/java/org/apache/felix/framework/capabilityset/SimpleFilterTest.java (original)
+++ felix/trunk/framework/src/test/java/org/apache/felix/framework/capabilityset/SimpleFilterTest.java Tue Aug 30 15:46:18 2011
@@ -70,5 +70,8 @@ public class SimpleFilterTest extends Te
assertTrue("Should match!", SimpleFilter.compareSubstring(pieces, "sdffoobsdfbar"));
assertTrue("Should match!", SimpleFilter.compareSubstring(pieces, "sdffoobsdfbarlj"));
assertFalse("Should not match!", SimpleFilter.compareSubstring(pieces, "sdffobsdfbarlj"));
+
+ pieces = SimpleFilter.parseSubstring("*foo(*bar*");
+ assertTrue("Should match!", SimpleFilter.compareSubstring(pieces, "foo()bar"));
}
}