Modified resolver to correctly mark fragment modules as resolved. (FELIX-777)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@705026 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
index dbd2c58..a894872 100755
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
+++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
@@ -1060,14 +1060,6 @@
getBundleSymbolicName(targetFragment),
new IModule[] { targetFragment });
}
-for (Iterator iter = fragmentMap.entrySet().iterator(); iter.hasNext(); )
-{
- Map.Entry entry = (Map.Entry) iter.next();
- String symName = (String) entry.getKey();
- IModule[] fragments = (IModule[]) entry.getValue();
- m_logger.log(Logger.LOG_DEBUG, "(FRAGMENT) WIRE: "
- + rootModule + " -> " + symName + " -> " + fragments[0]);
-}
// This variable maps an unresolved module to a list of candidate
// sets, where there is one candidate set for each requirement that
@@ -1118,9 +1110,13 @@
for (Iterator iter = fragmentMap.entrySet().iterator(); iter.hasNext(); )
{
Map.Entry entry = (Map.Entry) iter.next();
+ String symName = (String) entry.getKey();
IModule[] fragments = (IModule[]) entry.getValue();
// TODO: FRAGMENT - For now, just attach first candidate.
list.add(fragments[0]);
+ setResolved(fragments[0], true);
+m_logger.log(Logger.LOG_DEBUG, "(FRAGMENT) WIRE: "
+ + rootModule + " -> " + symName + " -> " + fragments[0]);
}
try
{