Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.metadata')
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
index be7aea670..2c68d5ecc 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
@@ -93,7 +93,9 @@ public class ProvidedCapability implements IProvidedCapability, IMemberProvider
}
public String getName() {
- return (String) attributes.get(MEMBER_NAME);
+ // There is always a "name" member, but it may not always be a string.
+ // Convert it here so that it is still possible to get the real type via getAttributes().
+ return attributes.get(MEMBER_NAME).toString();
}
public String getNamespace() {
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java
index e895d5bc2..47aa3ee51 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java
@@ -31,7 +31,7 @@ public interface IProvidedCapability {
/**
*
- * @return String the special "name" attribute of this capability.
+ * @return String the String representation of the special "name" attribute of this capability.
* @noreference This method is not intended to be referenced by clients.
*/
public String getName();

Back to the top