summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2013-04-27 22:33:36 (EDT)
committerPascal Rapicault2013-04-27 22:33:36 (EDT)
commit992eb1027cdf5358fd3a2b72926f34acf762f245 (patch)
tree054617cdf38b304eba1235065fe7e41203e6cb96
parent164c39b4dc69c0af51a12c63d5800ea1adb03ddb (diff)
downloadrt.equinox.p2-992eb1027cdf5358fd3a2b72926f34acf762f245.zip
rt.equinox.p2-992eb1027cdf5358fd3a2b72926f34acf762f245.tar.gz
rt.equinox.p2-992eb1027cdf5358fd3a2b72926f34acf762f245.tar.bz2
do nothing when size is 0
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/UserDefinedOptimizationFunction.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/UserDefinedOptimizationFunction.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/UserDefinedOptimizationFunction.java
index 07d7e1e..65da7b0 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/UserDefinedOptimizationFunction.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/UserDefinedOptimizationFunction.java
@@ -147,6 +147,9 @@ public class UserDefinedOptimizationFunction extends OptimizationFunction {
IQueryResult<IInstallableUnit> matches = picker.query(query, null);
List<IInstallableUnit> toSort = new ArrayList<IInstallableUnit>(matches.toUnmodifiableSet());
Collections.sort(toSort, Collections.reverseOrder());
+ if (toSort.size() == 0)
+ continue;
+
Projector.AbstractVariable abs = new Projector.AbstractVariable();
Object notlatest = dependencyHelper.not(toSort.get(0));
try {