Bug 575125 - Only check BundleDescription's dependents for fragments
Change-Id: I4ef1fa0f231c80b78bba42ff14088624e397adf2
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/183528
Tested-by: Lars Vogel <Lars.Vogel@vogella.com>
Tested-by: Equinox Bot <equinox-bot@eclipse.org>
Reviewed-by: Lars Vogel <Lars.Vogel@vogella.com>
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java
index 6d5fd3a..52f3b85 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateImpl.java
@@ -778,8 +778,8 @@
BundleDescription[] getFragments(final BundleDescription host) {
final List<BundleDescription> fragments = new ArrayList<>();
synchronized (this.monitor) {
- for (Iterator<BundleDescription> iter = bundleDescriptions.values().iterator(); iter.hasNext();) {
- BundleDescription bundle = iter.next();
+ BundleDescription[] dependents = host.getDependents();
+ for (BundleDescription bundle : dependents) {
HostSpecification hostSpec = bundle.getHost();
if (hostSpec != null) {