When coercing types for filter evaluation, we must now trim
the string representation for number types. (FELIX-2999)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1136192 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java b/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
index 4134489..9d5fd48 100644
--- a/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
+++ b/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
@@ -559,6 +559,11 @@
             }
             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 });