Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2007-11-30 12:32:24 +0000
committermkuppe2007-11-30 12:32:24 +0000
commit7bfd774bf370af4e06125e441e2530342380e2ab (patch)
treed484eaae2d8c17b814304357e0d1d363ee963929 /providers/bundles/org.eclipse.ecf.provider.jmdns
parent2ebbca8f0f43d9574763581605ba1d96bfb1094b (diff)
downloadorg.eclipse.ecf-7bfd774bf370af4e06125e441e2530342380e2ab.tar.gz
org.eclipse.ecf-7bfd774bf370af4e06125e441e2530342380e2ab.tar.xz
org.eclipse.ecf-7bfd774bf370af4e06125e441e2530342380e2ab.zip
NEW - bug 211585: [Discovery][JMDNS] parsing problem if service type defines a naming authority
https://bugs.eclipse.org/bugs/show_bug.cgi?id=211585
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.jmdns')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java28
1 files changed, 1 insertions, 27 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java
index c34b28d9c..3c1a8b2c0 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/identity/JMDNSServiceTypeID.java
@@ -11,13 +11,9 @@
package org.eclipse.ecf.provider.jmdns.identity;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.core.identity.Namespace;
-import org.eclipse.ecf.core.util.StringUtils;
import org.eclipse.ecf.discovery.identity.ServiceTypeID;
-import org.eclipse.ecf.internal.provider.jmdns.Messages;
-import org.eclipse.osgi.util.NLS;
/**
*
@@ -27,29 +23,7 @@ public class JMDNSServiceTypeID extends ServiceTypeID {
private static final long serialVersionUID = 7549266915001431139L;
protected JMDNSServiceTypeID(Namespace namespace, String type) throws IDCreateException {
- super(namespace);
- try {
- parse(type);
- createType();
- } catch (final Exception e) {
- throw new IDCreateException(NLS.bind(Messages.JMDNSServiceTypeID_EXCEPTION_INVALID_TYPE_ID, type));
- }
- }
-
- // Format of an DNS SRV RR _Service._Proto.Name
- // e.g. _ecftcp._tcp.local.
- // e.g. _service._dns-srv._udp.ecf.eclipse.org.
- private void parse(String type) {
- this.typeName = type;
- Assert.isNotNull(this.typeName);
- this.namingAuthority = DEFAULT_NA;
- final int protoBegin = type.lastIndexOf("_"); //$NON-NLS-1$
- final int protoEnd = type.indexOf(".", protoBegin); //$NON-NLS-1$
- protocols = new String[] {type.substring(protoBegin + 1, protoEnd)};
- scopes = new String[] {type.substring(protoEnd + 1, type.length() - 1)};
- String servicesString = type.substring(0, protoBegin - 1);
- servicesString = servicesString.substring(1);
- services = StringUtils.split(servicesString, "_"); //$NON-NLS-1$
+ super(namespace, type);
}
/* (non-Javadoc)

Back to the top