felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r904161 - /felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/proto3/Proto3Resolver.java
Date Thu, 28 Jan 2010 17:07:35 GMT
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));
                         }
                     }
                 }



Mime
View raw message