Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2009-01-06 14:20:55 +0000
committerJohn Arthorne2009-01-06 14:20:55 +0000
commit0e06a08da39bc6f6a8ba5bc064d8359ffbee9fba (patch)
tree2ddcdd33818dac1d6809d32901f0d516dbff5d1b /bundles
parent6d3694358081429f79df8e466e51e8a6242a4126 (diff)
downloadrt.equinox.p2-0e06a08da39bc6f6a8ba5bc064d8359ffbee9fba.tar.gz
rt.equinox.p2-0e06a08da39bc6f6a8ba5bc064d8359ffbee9fba.tar.xz
rt.equinox.p2-0e06a08da39bc6f6a8ba5bc064d8359ffbee9fba.zip
Bug 260022 [metadata] ProvidedCapabilities don't consider version in .equals()
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ProvidedCapability.java2
2 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java
index c65d44252..f22e0f1e1 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java
@@ -49,6 +49,7 @@ public interface IProvidedCapability {
* <li> Both this object and the given object are of type IProvidedCapability
* <li> The result of <b>getName()</b> on both objects are equal
* <li> The result of <b>getNamespace()</b> on both objects are equal
+ * <li> The result of <b>getVersion()</b> on both objects are equal
* </ul>
*/
public boolean equals(Object other);
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ProvidedCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ProvidedCapability.java
index 7ec0a1438..0c310b209 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ProvidedCapability.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ProvidedCapability.java
@@ -40,7 +40,7 @@ public class ProvidedCapability implements IProvidedCapability {
return false;
if (!(name.equals(otherCapability.getName())))
return false;
- return true;
+ return version.equals(otherCapability.getVersion());
}
public String getName() {

Back to the top