diff options
author | Andrey Loskutov | 2018-03-31 17:43:45 +0000 |
---|---|---|
committer | Andrey Loskutov | 2018-03-31 17:43:45 +0000 |
commit | 2cb244b497aba924567b87d0dadb0d2b260dfa3d (patch) | |
tree | b162a8ee26a2a90415a237a882c05fccbbb41518 | |
parent | e6a6ae711af0f1e7de635df9521060623c4e9f12 (diff) | |
download | rt.equinox.framework-2cb244b497aba924567b87d0dadb0d2b260dfa3d.tar.gz rt.equinox.framework-2cb244b497aba924567b87d0dadb0d2b260dfa3d.tar.xz rt.equinox.framework-2cb244b497aba924567b87d0dadb0d2b260dfa3d.zip |
Bug 518418 - avoid random order in return values in StateHelperImplI20180408-2000I20180407-1500I20180406-2000I20180405-2000I20180404-2000I20180403-2000I20180402-2000
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.java | 4 |
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 ad13c790a..03aff3b4a 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()]); |