Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordj2011-11-10 13:43:53 -0500
committerdj2011-11-10 13:44:25 -0500
commit79595ec1c9670b7e748932f0ccdb187412cb9500 (patch)
tree22923638a15f6ba80eab97c790274bb66fb0e3c7 /bundles/org.eclipse.equinox.p2.director
parentab8fe82cc1b198e8ec7412d5ae302b88f999d603 (diff)
downloadrt.equinox.p2-79595ec1c9670b7e748932f0ccdb187412cb9500.tar.gz
rt.equinox.p2-79595ec1c9670b7e748932f0ccdb187412cb9500.tar.xz
rt.equinox.p2-79595ec1c9670b7e748932f0ccdb187412cb9500.zip
Minor code changes in projector.v20111110-1844
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.director')
-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