Speed-up URL stream/content handler lookup by using a tracker again. The difference to the previous tracker is that we now create and maintain the trackers inside the framework so don't need to do classloads when using them (FELIX-1138).
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@810202 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/URLHandlersActivator.java b/framework/src/main/java/org/apache/felix/framework/URLHandlersActivator.java
index 69db16a..fc874d2 100644
--- a/framework/src/main/java/org/apache/felix/framework/URLHandlersActivator.java
+++ b/framework/src/main/java/org/apache/felix/framework/URLHandlersActivator.java
@@ -117,7 +117,18 @@
for (int i = 0;(i < refs.length) && (service == null);i++)
{
- if (value.equals(refs[i].getProperty(key)))
+ Object values = refs[i].getProperty(key);
+ if (values instanceof String[])
+ {
+ for (int j = 0;(j < ((String[]) values).length) && (service == null);j++)
+ {
+ if (value.equals(((String[]) values)[j]))
+ {
+ service = tracker.getService(refs[i]);
+ }
+ }
+ }
+ else if (value.equals(values))
{
service = tracker.getService(refs[i]);
}