felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1241231 - /felix/sandbox/rickhall/obr-resolver/src/main/java/org/apache/felix/resolver/impl/ResolverImpl.java
Date Mon, 06 Feb 2012 22:45:02 GMT
Author: rickhall
Date: Mon Feb  6 22:45:02 2012
New Revision: 1241231

URL: http://svn.apache.org/viewvc?rev=1241231&view=rev
Log:
Rename variable and fix potential bug in populateWireMap().

Modified:
    felix/sandbox/rickhall/obr-resolver/src/main/java/org/apache/felix/resolver/impl/ResolverImpl.java

Modified: felix/sandbox/rickhall/obr-resolver/src/main/java/org/apache/felix/resolver/impl/ResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/obr-resolver/src/main/java/org/apache/felix/resolver/impl/ResolverImpl.java?rev=1241231&r1=1241230&r2=1241231&view=diff
==============================================================================
--- felix/sandbox/rickhall/obr-resolver/src/main/java/org/apache/felix/resolver/impl/ResolverImpl.java
(original)
+++ felix/sandbox/rickhall/obr-resolver/src/main/java/org/apache/felix/resolver/impl/ResolverImpl.java
Mon Feb  6 22:45:02 2012
@@ -1409,14 +1409,14 @@ public class ResolverImpl implements Fel
         Map<Resource, List<Wire>> wireMap,
         Candidates allCandidates)
     {
-        Resource unwrappedRevision = getActualResource(resource);
-        if (!env.getWirings().containsKey(resource)
-            && !wireMap.containsKey(unwrappedRevision))
+        Resource unwrappedResource = getActualResource(resource);
+        if (!env.getWirings().containsKey(unwrappedResource)
+            && !wireMap.containsKey(unwrappedResource))
         {
-            wireMap.put(unwrappedRevision, (List<Wire>) Collections.EMPTY_LIST);
+            wireMap.put(unwrappedResource, (List<Wire>) Collections.EMPTY_LIST);
 
             List<Wire> packageWires = new ArrayList<Wire>();
-            List<Wire> Wires = new ArrayList<Wire>();
+            List<Wire> bundleWires = new ArrayList<Wire>();
             List<Wire> capabilityWires = new ArrayList<Wire>();
 
             for (Requirement req : resource.getRequirements(null))
@@ -1435,7 +1435,7 @@ public class ResolverImpl implements Fel
                         }
                         Packages candPkgs = revisionPkgMap.get(cand.getResource());
                         Wire wire = new WireImpl(
-                            unwrappedRevision,
+                            unwrappedResource,
                             getActualRequirement(req),
                             getActualResource(cand.getResource()),
                             getActualCapability(cand));
@@ -1445,7 +1445,7 @@ public class ResolverImpl implements Fel
                         }
                         else if (req.getNamespace().equals(ResourceConstants.WIRING_BUNDLE_NAMESPACE))
                         {
-                            Wires.add(wire);
+                            bundleWires.add(wire);
                         }
                         else
                         {
@@ -1456,9 +1456,9 @@ public class ResolverImpl implements Fel
             }
 
             // Combine package wires with require wires last.
-            packageWires.addAll(Wires);
+            packageWires.addAll(bundleWires);
             packageWires.addAll(capabilityWires);
-            wireMap.put(unwrappedRevision, packageWires);
+            wireMap.put(unwrappedResource, packageWires);
 
             // Add host wire for any fragments.
             if (resource instanceof HostResource)
@@ -1477,8 +1477,8 @@ public class ResolverImpl implements Fel
                             getActualResource(fragment),
                             fragment.getRequirements(
                                 ResourceConstants.WIRING_HOST_NAMESPACE).get(0),
-                            unwrappedRevision,
-                            unwrappedRevision.getCapabilities(
+                            unwrappedResource,
+                            unwrappedResource.getCapabilities(
                                 ResourceConstants.WIRING_HOST_NAMESPACE).get(0)));
                 }
             }



Mime
View raw message