You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2012/05/10 20:17:24 UTC

svn commit: r1336820 - /felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java

Author: rickhall
Date: Thu May 10 18:17:23 2012
New Revision: 1336820

URL: http://svn.apache.org/viewvc?rev=1336820&view=rev
Log:
Apply patch (FELIX-3458) to allow generic to hava a wire where the providing
resource is the same as the requiring resources (i.e., it wires to itself).

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

Modified: felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java?rev=1336820&r1=1336819&r2=1336820&view=diff
==============================================================================
--- felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java (original)
+++ felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java Thu May 10 18:17:23 2012
@@ -1528,8 +1528,11 @@ public class ResolverImpl implements Res
                 if ((cands != null) && (cands.size() > 0))
                 {
                     Capability cand = cands.get(0);
-                    // Ignore resources that import themselves.
-                    if (!resource.equals(cand.getResource()))
+                    // Do not create wires for the osgi.wiring.* namespaces
+                    // if the provider and requirer are the same resource;
+                    // allow such wires for non-OSGi wiring namespaces.
+                    if (!cand.getNamespace().startsWith("osgi.wiring.")
+                        || !resource.equals(cand.getResource()))
                     {
                         if (!rc.getWirings().containsKey(cand.getResource()))
                         {