commit | 1658993e7ab409b2cacd648a9edc3bf3aebbfc80 | [log] [tgz] |
---|---|---|
author | Richard S. Hall <rickhall@apache.org> | Wed Aug 16 16:43:25 2006 +0000 |
committer | Richard S. Hall <rickhall@apache.org> | Wed Aug 16 16:43:25 2006 +0000 |
tree | 6b07c1bdf8edbe97cb8eb1e76849e2acd78f76de | |
parent | a8c73eb8ed4c3702cb59ff8b06a8b184c099a7fc [diff] |
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. git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@431942 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java index 0e264b0f..53c9681 100755 --- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java +++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
@@ -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)