commit | 03cf65bcb3d875e6976e5855a26e787272c090b7 | [log] [tgz] |
---|---|---|
author | Richard S. Hall <rickhall@apache.org> | Wed Jun 15 21:04:22 2011 +0000 |
committer | Richard S. Hall <rickhall@apache.org> | Wed Jun 15 21:04:22 2011 +0000 |
tree | cd3988e9101d9d3ca0c659545d03013947045ffd | |
parent | c4e7599b34c83fd325870f8deb6b3612cf1f17f2 [diff] |
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 });