Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.director/src')
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java10
1 files changed, 3 insertions, 7 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 64623eb24..093595b3d 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
@@ -201,14 +201,9 @@ public class Projector {
} else {
dependencyHelper = new DependencyHelper<Object, Explanation>(solver);
}
- Iterator<IInstallableUnit> iusToEncode = queryResult.iterator();
- List<IInstallableUnit> iusToOrder = new ArrayList<IInstallableUnit>();
- while (iusToEncode.hasNext()) {
- iusToOrder.add(iusToEncode.next());
- }
+ List<IInstallableUnit> iusToOrder = new ArrayList<IInstallableUnit>(queryResult.toSet());
Collections.sort(iusToOrder);
- iusToEncode = iusToOrder.iterator();
- while (iusToEncode.hasNext()) {
+ for (Iterator<IInstallableUnit> iusToEncode = iusToOrder.iterator(); iusToEncode.hasNext();) {
if (monitor.isCanceled()) {
result.merge(Status.CANCEL_STATUS);
throw new OperationCanceledException();
@@ -292,6 +287,7 @@ public class Projector {
}
continue;
}
+ // IUs are sorted from highest version to lowest.
Collections.sort(conflictingEntries, Collections.reverseOrder());
BigInteger weight = POWER;
// have we already found a version that is already installed?

Back to the top