felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r948840 - in /felix/trunk/framework/src/main/java/org/apache/felix/framework: FelixResolverState.java resolver/ResolverImpl.java
Date Thu, 27 May 2010 13:55:34 GMT
Author: rickhall
Date: Thu May 27 13:55:34 2010
New Revision: 948840

URL: http://svn.apache.org/viewvc?rev=948840&view=rev
Log:
Various debugging cleanup. (FELIX-2035)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java?rev=948840&r1=948839&r2=948840&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
Thu May 27 13:55:34 2010
@@ -712,12 +712,6 @@ public class FelixResolverState implemen
         }
     }
 
-// TODO: FELIX3 - Try to eliminate this.
-    public synchronized List<Module> getModules()
-    {
-        return m_modules;
-    }
-
     public synchronized void moduleResolved(Module module)
     {
         if (module.isResolved())

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java?rev=948840&r1=948839&r2=948840&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
Thu May 27 13:55:34 2010
@@ -94,7 +94,7 @@ public class ResolverImpl implements Res
                     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 @@ public class ResolverImpl implements Res
         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)"));



Mime
View raw message