diff options
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java b/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java index d22ffc413..61fa97b9e 100644 --- a/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java +++ b/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java @@ -476,13 +476,26 @@ class Candidates break; } } + if (candidates.isEmpty()) + { + if (Util.isOptional(dependent)) + { + clearCandidates(dependent); + } + else + { + String msg = "Unable to resolve " + dependent.getResource() + + ": missing requirement " + dependent; + throw new ResolutionException(msg, null, Collections.singleton(dependent)); + } + } } } } } } - private boolean isSubstituted(Capability substitutableCap, Map<Capability, Integer> substituteStatuses) throws ResolutionException + private boolean isSubstituted(Capability substitutableCap, Map<Capability, Integer> substituteStatuses) { Integer substituteState = substituteStatuses.get(substitutableCap); if (substituteState == null) |