felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r745610 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java
Date Wed, 18 Feb 2009 18:57:50 GMT
Author: rickhall
Date: Wed Feb 18 18:57:49 2009
New Revision: 745610

URL: http://svn.apache.org/viewvc?rev=745610&view=rev
Log:
Need to double check for a cycle when creating wires for a fragment. (FELIX-852)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java?rev=745610&r1=745609&r2=745610&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java
Wed Feb 18 18:57:49 2009
@@ -1553,6 +1553,13 @@
             // Instead of creating wires for the fragment, we will create them
             // for the host.
             importer = host;
+
+            // Make sure we haven't already seen the host to avoid a cycle.
+            if (wireMap.get(importer) != null)
+            {
+                return wireMap;
+            }
+
             // Now add the fragments candidates to the host.
             candSetList = (List) candidatesMap.get(host);
             for (int csIdx = 0; (host == null) && (csIdx < candSetList.size());
csIdx++)



Mime
View raw message