felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r903821 - /felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
Date Wed, 27 Jan 2010 20:35:32 GMT
Author: rickhall
Date: Wed Jan 27 20:35:32 2010
New Revision: 903821

URL: http://svn.apache.org/viewvc?rev=903821&view=rev
Log:
Remove unneeded code.

Modified:
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java?rev=903821&r1=903820&r2=903821&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
(original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
Wed Jan 27 20:35:32 2010
@@ -83,7 +83,7 @@
                 rethrow = null;
 
                 candidateMap = m_candidatePermutations.remove(0);
-dumpCandidateMap(state, candidateMap);
+//dumpCandidateMap(state, candidateMap);
 
                 try
                 {
@@ -306,7 +306,7 @@
                 for (Iterator<Capability> it = candCaps.iterator(); it.hasNext(); )
                 {
                     Capability candCap = it.next();
-System.out.println("+++ TRYING CAND " + candCap + " FOR " + req);
+//System.out.println("+++ TRYING CAND " + candCap + " FOR " + req);
                     try
                     {
                         // Try to resolve the candidate.
@@ -458,7 +458,7 @@
 //       then it should be listed as an export.
         if (candBlame.m_cap.getNamespace().equals(Capability.PACKAGE_NAMESPACE))
         {
-System.out.println("+++ MERGING " + candBlame.m_cap + " INTO " + current);
+//System.out.println("+++ MERGING " + candBlame.m_cap + " INTO " + current);
             String pkgName = (String)
                 candBlame.m_cap.getAttribute(Capability.PACKAGE_ATTR).getValue();
 
@@ -543,7 +543,7 @@
                 currentPkgs.m_requiredPkgs.putAll(currentPkgsCopy.m_requiredPkgs);
                 currentPkgs.m_usedPkgs.putAll(currentPkgsCopy.m_usedPkgs);
             }
-dumpModulePkgs(current, currentPkgs);
+//dumpModulePkgs(current, currentPkgs);
         }
     }
 
@@ -630,10 +630,10 @@
                 List<Blame> currentRequiredBlames = currentPkgs.m_requiredPkgs.get(usedPkgName);
 
                 Packages candSourcePkgs = modulePkgMap.get(candSourceCap.getModule());
-System.out.println("+++ candSourceCap " + candSourceCap);
-System.out.println("+++ candSourceCap.getModule() " + candSourceCap.getModule() + " (" +
candSourceCap.getModule().isResolved() + ")");
-System.out.println("+++ candSourcePkgs " + candSourcePkgs);
-System.out.println("+++ candSourcePkgs.m_exportedPkgs " + candSourcePkgs.m_exportedPkgs);
+//System.out.println("+++ candSourceCap " + candSourceCap);
+//System.out.println("+++ candSourceCap.getModule() " + candSourceCap.getModule() + " ("
+ candSourceCap.getModule().isResolved() + ")");
+//System.out.println("+++ candSourcePkgs " + candSourcePkgs);
+//System.out.println("+++ candSourcePkgs.m_exportedPkgs " + candSourcePkgs.m_exportedPkgs);
                 Blame candSourceBlame = candSourcePkgs.m_exportedPkgs.get(usedPkgName);
                 candSourceBlame = (candSourceBlame != null)
                     ? candSourceBlame
@@ -662,7 +662,7 @@
                         usedCaps = new ArrayList<Blame>();
                         currentPkgs.m_usedPkgs.put(usedPkgName, usedCaps);
                     }
-System.out.println("+++ MERGING CB " + candBlame + " SB " + candSourceBlame);
+//System.out.println("+++ MERGING CB " + candBlame + " SB " + candSourceBlame);
 //                    usedCaps.add(new Blame(candBlame.m_reqs, sourceBlame.m_cap));
                     usedCaps.add(candSourceBlame);
 //                    return;
@@ -756,43 +756,6 @@
         return sources;
     }
 
-    private static void calculateResolvedPackages(
-        Module module, List<Requirement> incomingReqs, Packages pkgs)
-    {
-        for (Wire wire : module.getWires())
-        {
-            if (wire.getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE))
-            {
-                pkgs.m_importedPkgs.put(
-                    (String) wire.getCapability().getAttribute(Capability.PACKAGE_ATTR).getValue(),
-                    new Blame(incomingReqs, wire.getCapability()));
-                calculateResolvedUses(wire.getCapability(), pkgs.m_usedPkgs);
-            }
-            else if (wire.getCapability().getNamespace().equals(Capability.MODULE_NAMESPACE))
-            {
-                for (Capability cap : wire.getCapability().getModule().getCapabilities())
-                {
-                    if (cap.getNamespace().equals(Capability.PACKAGE_ATTR))
-                    {
-                        String pkgName = (String) cap.getAttribute(Capability.PACKAGE_ATTR).getValue();
-                        List<Blame> requiredBlames = pkgs.m_requiredPkgs.get(pkgName);
-                        if (requiredBlames == null)
-                        {
-                            requiredBlames = new ArrayList<Blame>();
-                            pkgs.m_requiredPkgs.put(pkgName, requiredBlames);
-                        }
-                        requiredBlames.add(new Blame(incomingReqs, cap));
-                        calculateResolvedUses(wire.getCapability(), pkgs.m_usedPkgs);
-                    }
-                }
-            }
-        }
-    }
-
-    private static void calculateResolvedUses(Capability cap, Map<String, List<Blame>>
usedPkgs)
-    {
-    }
-
     private static Map<Requirement, Set<Capability>> copyCandidateMap(
         Map<Requirement, Set<Capability>> candidateMap)
     {



Mime
View raw message