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:07:35 UTC
svn commit: r904161 -
/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
Author: rickhall
Date: Thu Jan 28 17:07:35 2010
New Revision: 904161
URL: http://svn.apache.org/viewvc?rev=904161&view=rev
Log:
Keep require-bundle wires in declared order.
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=904161&r1=904160&r2=904161&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 Thu Jan 28 17:07:35 2010
@@ -835,16 +835,19 @@
}
}
- // 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 Wire(module,
- rbEntry.getKey(),
- rbEntry.getValue().getModule(),
- rbEntry.getValue()));
+ rbReq,
+ cap.getModule(),
+ cap));
}
}
}