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 2009/02/18 19:57:50 UTC
svn commit: r745610 -
/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java
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++)