felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1136192 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
Date Wed, 15 Jun 2011 21:04:22 GMT
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 });



Mime
View raw message