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 2010/01/28 18:24:06 UTC
svn commit: r904172 -
/felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
Author: rickhall
Date: Thu Jan 28 17:24:05 2010
New Revision: 904172
URL: http://svn.apache.org/viewvc?rev=904172&view=rev
Log:
Keep require-bundle wires in declared order.
Modified:
felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
Modified: felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java?rev=904172&r1=904171&r2=904172&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java (original)
+++ felix/sandbox/rickhall/framework-proto/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java Thu Jan 28 17:24:05 2010
@@ -1048,17 +1048,20 @@
}
}
- // Ignore modules that import themselves.
- for (Entry<Requirement, Capability> rbEntry : rbMap.entrySet())
+ // Loop through RB requirements to keep the wires in the
+ // correct order, which is required by the spec.
+ for (Requirement rbReq : rbReqs)
{
- if (!module.equals(rbEntry.getValue().getModule()))
+ Capability cap = rbMap.get(rbReq);
+ // Ignore modules that import themselves.
+ if ((cap != null) && !module.equals(cap.getModule()))
{
moduleWires.add(
new WireModuleImpl(module,
- rbEntry.getKey(),
- rbEntry.getValue().getModule(),
- rbEntry.getValue(),
- pkgs.getRequiredPackages(rbEntry.getValue().getModule())));
+ rbReq,
+ cap.getModule(),
+ cap,
+ pkgs.getRequiredPackages(cap.getModule())));
}
}
}