felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r678443 - /felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
Date Mon, 21 Jul 2008 14:40:04 GMT
Author: rickhall
Date: Mon Jul 21 07:40:04 2008
New Revision: 678443

URL: http://svn.apache.org/viewvc?rev=678443&view=rev
Log:
Modified OBR to correctly consider the namespace attribute when matching
capabilities to requirements. (FELIX-638)

Modified:
    felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java

Modified: felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java?rev=678443&r1=678442&r2=678443&view=diff
==============================================================================
--- felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
(original)
+++ felix/trunk/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
Mon Jul 21 07:40:04 2008
@@ -270,7 +270,8 @@
             Capability[] caps = resource.getCapabilities();
             for (int capIdx = 0; (caps != null) && (capIdx < caps.length); capIdx++)
             {
-                if (req.isSatisfied(caps[capIdx]))
+                if (caps[capIdx].getName().equals(req.getName())
+                    && req.isSatisfied(caps[capIdx]))
                 {
                     // The requirement is already satisfied an existing
                     // resource, return the resource.
@@ -291,7 +292,8 @@
             Capability[] caps = resources[resIdx].getCapabilities();
             for (int capIdx = 0; (caps != null) && (capIdx < caps.length); capIdx++)
             {
-                if (req.isSatisfied(caps[capIdx]))
+                if (caps[capIdx].getName().equals(req.getName())
+                    && req.isSatisfied(caps[capIdx]))
                 {
                     return resources[resIdx];
                 }
@@ -315,7 +317,8 @@
             Capability[] caps = resources[resIdx].getCapabilities();
             for (int capIdx = 0; (caps != null) && (capIdx < caps.length); capIdx++)
             {
-                if (req.isSatisfied(caps[capIdx]))
+                if (caps[capIdx].getName().equals(req.getName())
+                    && req.isSatisfied(caps[capIdx]))
                 {
                     matchingCandidates.add(resources[resIdx]);
                 }
@@ -343,7 +346,8 @@
                 Capability[] caps = resources[resIdx].getCapabilities();
                 for (int capIdx = 0; (caps != null) && (capIdx < caps.length);
capIdx++)
                 {
-                    if (req.isSatisfied(caps[capIdx]))
+                    if (caps[capIdx].getName().equals(req.getName())
+                        && req.isSatisfied(caps[capIdx]))
                     {
                         matchingCandidates.add(resources[resIdx]);
                     }



Mime
View raw message