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/06/15 23:04:22 UTC

svn commit: r1136192 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java

Author: rickhall
Date: Wed Jun 15 21:04:22 2011
New Revision: 1136192

URL: http://svn.apache.org/viewvc?rev=1136192&view=rev
Log:
When coercing types for filter evaluation, we must now trim
the string representation for number types. (FELIX-2999)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java?rev=1136192&r1=1136191&r2=1136192&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java Wed Jun 15 21:04:22 2011
@@ -559,6 +559,11 @@ public void dump()
             }
             else
             {
+                // Spec says we should trim number types.
+                if ((lhs instanceof Number) || (lhs instanceof Boolean))
+                {
+                    rhsString = rhsString.trim();
+                }
                 Constructor ctor = m_secureAction.getConstructor(lhs.getClass(), STRING_CLASS);
                 m_secureAction.setAccesssible(ctor);
                 rhs = ctor.newInstance(new Object[] { rhsString });