aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2018-03-31 13:43:45 -0400
committerAndrey Loskutov2018-03-31 13:43:45 -0400
commit2cb244b497aba924567b87d0dadb0d2b260dfa3d (patch)
treeb162a8ee26a2a90415a237a882c05fccbbb41518
parente6a6ae711af0f1e7de635df9521060623c4e9f12 (diff)
downloadrt.equinox.framework-2cb244b497aba924567b87d0dadb0d2b260dfa3d.zip
rt.equinox.framework-2cb244b497aba924567b87d0dadb0d2b260dfa3d.tar.gz
rt.equinox.framework-2cb244b497aba924567b87d0dadb0d2b260dfa3d.tar.xz
Using LinkedHashSet to make sue the order of calculated dependencies is stable. Change-Id: I9ce68c5c64ba6c60edab7eded331a337cbd4a232 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java
index ad13c79..03aff3b 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java
@@ -37,7 +37,7 @@ public final class StateHelperImpl implements StateHelper {
if (bundles == null || bundles.length == 0)
return new BundleDescription[0];
- Set<BundleDescription> reachable = new HashSet<>(bundles.length);
+ Set<BundleDescription> reachable = new LinkedHashSet<>(bundles.length);
for (int i = 0; i < bundles.length; i++) {
if (!bundles[i].isResolved())
continue;
@@ -58,7 +58,7 @@ public final class StateHelperImpl implements StateHelper {
public BundleDescription[] getPrerequisites(BundleDescription[] bundles) {
if (bundles == null || bundles.length == 0)
return new BundleDescription[0];
- Set<BundleDescription> reachable = new HashSet<>(bundles.length);
+ Set<BundleDescription> reachable = new LinkedHashSet<>(bundles.length);
for (int i = 0; i < bundles.length; i++)
addPrerequisites(bundles[i], reachable);
return reachable.toArray(new BundleDescription[reachable.size()]);