Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-05-19 20:32:36 -0400
committerspingel2010-05-19 20:32:36 -0400
commit45e3b49f7541c8273e199038bcd6476bbd6c0adf (patch)
tree94f6df3b0a0591ac8cc9e99e8c5b43e1691814b1
parentd3fdaf6e200ed56c1536a823533232fd2ccccefe (diff)
downloadrt.equinox.p2-45e3b49f7541c8273e199038bcd6476bbd6c0adf.tar.gz
rt.equinox.p2-45e3b49f7541c8273e199038bcd6476bbd6c0adf.tar.xz
rt.equinox.p2-45e3b49f7541c8273e199038bcd6476bbd6c0adf.zip
bug 313412 - [discovery] DiscoveryInstallOperation can install older version of a feature over a newer onev20100519
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
index cd6d985e8..001310110 100644
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
+++ b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Tasktop Technologies - initial API and implementation
+ * David Dubrow - fix for bug 313412
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui.discovery.operations;
@@ -204,7 +205,7 @@ public class DiscoveryInstallOperation implements IRunnableWithProgress {
Map<String, Version> symbolicNameToVersion = new HashMap<String, Version>();
for (IInstallableUnit unit : installableUnits) {
Version version = symbolicNameToVersion.get(unit.getId());
- if (version == null || version.compareTo(unit.getVersion()) == -1) {
+ if (version == null || version.compareTo(unit.getVersion()) < 0) {
symbolicNameToVersion.put(unit.getId(), unit.getVersion());
}
}

Back to the top