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 2006/08/16 18:43:26 UTC

svn commit: r431942 - /incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java

Author: rickhall
Date: Wed Aug 16 09:43:25 2006
New Revision: 431942

URL: http://svn.apache.org/viewvc?rev=431942&view=rev
Log:
When attempting to find a candidate for a dynamic import, we should try to
find the first candidate that can be resolved; the code was incorrectly
trying to resolve the importing module instead of the candidate module.

Modified:
    incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java

Modified: incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java?rev=431942&r1=431941&r2=431942&view=diff
==============================================================================
--- incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java (original)
+++ incubator/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java Wed Aug 16 09:43:25 2006
@@ -401,7 +401,7 @@
                 }
 
                 // If there were no "in use" candidates, then try "available"
-                // candidates.
+                // candidates and take the first one that can resolve.
                 if (candidate == null)
                 {
                     candidates = getAvailableExporters(impMatch, false);
@@ -411,7 +411,7 @@
                     {
                         try
                         {
-                            resolve(module);
+                            resolve(candidates[candIdx]);
                             candidate = candidates[candIdx];
                         }
                         catch (ResolveException ex)