felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r501925 - /incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java
Date Wed, 31 Jan 2007 18:01:47 GMT
Author: rickhall
Date: Wed Jan 31 10:01:39 2007
New Revision: 501925

URL: http://svn.apache.org/viewvc?view=rev&rev=501925
Log:
Modified utility method to get satisfying capability so that it could 
handle more than one capability type. (FELIX-28)

Modified:
    incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java

Modified: incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java?view=diff&rev=501925&r1=501924&r2=501925
==============================================================================
--- incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java
(original)
+++ incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/Util.java
Wed Jan 31 10:01:39 2007
@@ -189,16 +189,13 @@
 
     public static ICapability getSatisfyingCapability(IModule m, IRequirement req)
     {
-        if (req.getNamespace().equals(ICapability.PACKAGE_NAMESPACE))
+        ICapability[] caps = m.getDefinition().getCapabilities();
+        for (int i = 0; (caps != null) && (i < caps.length); i++)
         {
-            ICapability[] caps = m.getDefinition().getCapabilities();
-            for (int i = 0; (caps != null) && (i < caps.length); i++)
+            if (caps[i].getNamespace().equals(req.getNamespace()) &&
+                req.isSatisfied(caps[i]))
             {
-                if (caps[i].getNamespace().equals(ICapability.PACKAGE_NAMESPACE) &&
-                    req.isSatisfied(caps[i]))
-                {
-                    return caps[i];
-                }
+                return caps[i];
             }
         }
         return null;



Mime
View raw message