Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2018-03-05 21:11:29 -0500
committerslewis2018-03-05 21:11:29 -0500
commitd64f3db57819c3bc6899f0b9fd22b9b46da908d8 (patch)
treeb44f9659dad8c130a21c40fce887287b1c8f3b7e /framework
parenta31ec2be6580596b05edd5071195e79d7af25234 (diff)
downloadorg.eclipse.ecf-d64f3db57819c3bc6899f0b9fd22b9b46da908d8.tar.gz
org.eclipse.ecf-d64f3db57819c3bc6899f0b9fd22b9b46da908d8.tar.xz
org.eclipse.ecf-d64f3db57819c3bc6899f0b9fd22b9b46da908d8.zip
Fix for DiscoveryNamespace.
Diffstat (limited to 'framework')
-rw-r--r--framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryNamespace.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryNamespace.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryNamespace.java
index 264c95401..293e9d7ee 100644
--- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryNamespace.java
+++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryNamespace.java
@@ -31,16 +31,13 @@ public class DiscoveryNamespace extends Namespace {
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.ecf.core.identity.Namespace#createInstance(java.lang.Object
+ * @see org.eclipse.ecf.core.identity.Namespace#createInstance(java.lang.Object
* [])
*/
public ID createInstance(Object[] parameters) throws IDCreateException {
- if (parameters != null && parameters.length == 1
- && parameters[0] instanceof IServiceTypeID) {
+ if (parameters != null && parameters.length == 1 && parameters[0] instanceof IServiceTypeID) {
return (ID) parameters[0];
- } else if (parameters != null && parameters.length == 2
- && parameters[0] instanceof IServiceTypeID
+ } else if (parameters != null && parameters.length == 2 && parameters[0] instanceof IServiceTypeID
&& parameters[1] instanceof URI) {
final IServiceTypeID type = (IServiceTypeID) parameters[0];
final URI uri = (URI) parameters[1];
@@ -49,13 +46,16 @@ public class DiscoveryNamespace extends Namespace {
throw new IDCreateException("Parameters must be of type IServiceTypeID"); //$NON-NLS-1$
}
+ public Class[][] getSupportedParameterTypes() {
+ return new Class[][] { { IServiceTypeID.class }, { IServiceTypeID.class, URI.class } };
+ }
+
private static class DiscoveryServiceID extends ServiceID {
private static final long serialVersionUID = -9017925060137305026L;
// Need public constructor
- public DiscoveryServiceID(Namespace namespace, IServiceTypeID type,
- URI uri) {
+ public DiscoveryServiceID(Namespace namespace, IServiceTypeID type, URI uri) {
super(namespace, type, uri);
}
}

Back to the top