Various debugging cleanup. (FELIX-2035)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@948840 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java b/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
index db21c8a..5aca2e3 100644
--- a/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
+++ b/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
@@ -712,12 +712,6 @@
}
}
-// TODO: FELIX3 - Try to eliminate this.
- public synchronized List<Module> getModules()
- {
- return m_modules;
- }
-
public synchronized void moduleResolved(Module module)
{
if (module.isResolved())
diff --git a/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java b/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
index bbc0ec4..42222da 100644
--- a/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
@@ -94,7 +94,7 @@
candidateMap = (m_usesPermutations.size() > 0)
? m_usesPermutations.remove(0)
: m_importPermutations.remove(0);
-//dumpCandidateMap(state, candidateMap);
+//dumpCandidateMap(candidateMap);
calculatePackageSpaces(
module, candidateMap, modulePkgMap,
@@ -1320,11 +1320,17 @@
return wireMap;
}
- private static void dumpCandidateMap(
- ResolverState state, Map<Requirement, Set<Capability>> candidateMap)
+ private static void dumpCandidateMap(Map<Requirement, Set<Capability>> candidateMap)
{
+ // Create set of all modules from requirements.
+ Set<Module> modules = new HashSet();
+ for (Entry<Requirement, Set<Capability>> entry : candidateMap.entrySet())
+ {
+ modules.add(entry.getKey().getModule());
+ }
+ // Now dump the modules.
System.out.println("=== BEGIN CANDIDATE MAP ===");
- for (Module module : ((FelixResolverState) state).getModules())
+ for (Module module : modules)
{
System.out.println(" " + module
+ " (" + (module.isResolved() ? "RESOLVED)" : "UNRESOLVED)"));