Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel LeBerre2010-02-23 22:47:49 +0000
committerDaniel LeBerre2010-02-23 22:47:49 +0000
commit31aed1e27bddbc6e8457e998e804d23e73a230c5 (patch)
tree19893f89269967f59c0a573fe534f23df7fd8cf2 /bundles
parent393bda7afc8db31be0f34f5d4157a24a33dd273b (diff)
downloadrt.equinox.p2-31aed1e27bddbc6e8457e998e804d23e73a230c5.tar.gz
rt.equinox.p2-31aed1e27bddbc6e8457e998e804d23e73a230c5.tar.xz
rt.equinox.p2-31aed1e27bddbc6e8457e998e804d23e73a230c5.zip
Bug 302582 - [planner] P2 does not pick up higher version of already installed plug-in from dropins
Using a Set instead of a List and a constains check. All tests will only pass once SAT4J will be upgraded to 2.2.x
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
index 3f1779aee..eaa61ecc2 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
@@ -639,7 +639,7 @@ public class SimplePlanner implements IPlanner {
return actionsIU;
}
- private IInstallableUnit createIURepresentingTheProfile(ArrayList<IRequirement> allRequirements) {
+ private IInstallableUnit createIURepresentingTheProfile(Set<IRequirement> allRequirements) {
InstallableUnitDescription iud = new MetadataFactory.InstallableUnitDescription();
String time = Long.toString(System.currentTimeMillis());
iud.setId(time);
@@ -674,7 +674,7 @@ public class SimplePlanner implements IPlanner {
}
}
}
- ArrayList<IRequirement> gatheredRequirements = new ArrayList<IRequirement>();
+ Set<IRequirement> gatheredRequirements = new HashSet<IRequirement>();
//Process all the IUs being added
Map<IInstallableUnit, Map<String, String>> iuPropertiesToAdd = profileChangeRequest.getInstallableUnitProfilePropertiesToAdd();
@@ -703,8 +703,7 @@ public class SimplePlanner implements IPlanner {
if (profileRequirement == null) {
profileRequirement = createRequirement(iu, profileChangeRequest.getProfile().getInstallableUnitProperty(iu, INCLUSION_RULES));
}
- if (!gatheredRequirements.contains(profileRequirement))
- gatheredRequirements.add(profileRequirement);
+ gatheredRequirements.add(profileRequirement);
}
//Now add any other requirement that we need to see satisfied

Back to the top