Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2011-05-02 15:36:19 -0400
committerPascal Rapicault2011-05-02 15:36:19 -0400
commit0afdd5a911a5878fa4466aa624fc631bd0693681 (patch)
tree8dd7f3e557c857ac7e171ffcae7269098524f02a /bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2
parentd87cc06cf993ce0ae4957c2fb2da70cf350c3b61 (diff)
downloadrt.equinox.p2-0afdd5a911a5878fa4466aa624fc631bd0693681.tar.gz
rt.equinox.p2-0afdd5a911a5878fa4466aa624fc631bd0693681.tar.xz
rt.equinox.p2-0afdd5a911a5878fa4466aa624fc631bd0693681.zip
Bug 323340 - [planner] Resolution is not stable
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2')
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
index 3a91fd73e..db4520848 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
@@ -284,23 +284,19 @@ public class Projector {
BigInteger maxWeight = POWER;
for (Entry<String, Map<Version, IInstallableUnit>> entry : s) {
- Map<Version, IInstallableUnit> conflictingEntries = entry.getValue();
-
- List<IInstallableUnit> toSort = new ArrayList<IInstallableUnit>(conflictingEntries.values());
+ List<IInstallableUnit> conflictingEntries = new ArrayList<IInstallableUnit>(entry.getValue().values());
if (conflictingEntries.size() == 1) {
- IInstallableUnit iu = toSort.get(0);
+ IInstallableUnit iu = conflictingEntries.get(0);
if (iu != metaIu) {
weightedObjects.add(WeightedObject.newWO(iu, POWER));
}
continue;
}
- Collections.sort(toSort, Collections.reverseOrder());
+ Collections.sort(conflictingEntries, Collections.reverseOrder());
BigInteger weight = POWER;
- int count = toSort.size();
boolean installedIuMet = false;
boolean rootedMet = false;
- for (int i = 0; i < count; i++) {
- IInstallableUnit iu = toSort.get(i);
+ for (IInstallableUnit iu : conflictingEntries) {
if (!rootedMet && isInstalled(iu) && !transitiveClosure.contains(iu)) {
installedIuMet = true;
weightedObjects.add(WeightedObject.newWO(iu, BigInteger.ONE));

Back to the top