diff options
author | Thomas Watson | 2014-05-27 19:39:32 +0000 |
---|---|---|
committer | Thomas Watson | 2014-05-27 21:05:18 +0000 |
commit | 425f0e16f7f83c05603e5d62285fa8b81b57fde4 (patch) | |
tree | 8e617bb5e6b05c664fca8870ef578fd445082c7f | |
parent | a56163f313a4a471620cc143f6fbbfbae4352de6 (diff) | |
download | rt.equinox.framework-I20140527-2000.tar.gz rt.equinox.framework-I20140527-2000.tar.xz rt.equinox.framework-I20140527-2000.zip |
Bug 435796 - IndexOutOfBoundsException in ResolverImplI20140528-0930I20140528-0830I20140528-0800I20140528-0115I20140527-2300I20140527-2000
- Fix by checking if all candidates are removed after substitution
Change-Id: Id265340280e3f2722e87b57c43ac6d944fed6905
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-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) |