commit | 3b53455bcf51e967abb99572fe20f7795215ada3 | [log] [tgz] |
---|---|---|
author | Richard S. Hall <rickhall@apache.org> | Wed Feb 18 18:57:49 2009 +0000 |
committer | Richard S. Hall <rickhall@apache.org> | Wed Feb 18 18:57:49 2009 +0000 |
tree | 820cd04464439a0b2b127681fe3b9ddf6d21a454 | |
parent | 898f09c1bfc5da3c0e48bf96c162de3015d9240e [diff] |
Need to double check for a cycle when creating wires for a fragment. (FELIX-852) git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@745610 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java index c6258f1..4d3224a 100644 --- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java +++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/Resolver.java
@@ -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++)