You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2011/07/22 21:07:33 UTC
svn commit: r1149694 -
/felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
Author: rickhall
Date: Fri Jul 22 19:07:32 2011
New Revision: 1149694
URL: http://svn.apache.org/viewvc?rev=1149694&view=rev
Log:
Fragments may get re-resolved, so we have to special case this situation
to create a union of its host wires. (FELIX-2950)
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java?rev=1149694&r1=1149693&r2=1149694&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java Fri Jul 22 19:07:32 2011
@@ -747,6 +747,16 @@ class StatefulResolver
List<BundleWire> bundleWires =
new ArrayList<BundleWire>(resolverWires.size());
+ // Need to special case fragments since they may already have
+ // wires if they are already attached to another host; if that
+ // is the case, then we want to merge the old host wires with
+ // the new ones.
+ if ((revision.getWiring() != null) && Util.isFragment(revision))
+ {
+ // Fragments only have host wires, so just add them all.
+ bundleWires.addAll(revision.getWiring().getRequiredWires(null));
+ }
+
// Loop through resolver wires to calculate the package
// space implied by the wires as well as to record the
// dependencies.