Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-04-10 21:40:10 -0400
committerslewis2009-04-10 21:40:10 -0400
commite903d3f5db44107f9cd7151c42ed22fff53f94e8 (patch)
tree4c4c996791ef981190b58085f5512f544cd526a9
parent23abeb2ab8dd37911f0cf4db523aa0e56b600058 (diff)
downloadorg.eclipse.ecf-e903d3f5db44107f9cd7151c42ed22fff53f94e8.tar.gz
org.eclipse.ecf-e903d3f5db44107f9cd7151c42ed22fff53f94e8.tar.xz
org.eclipse.ecf-e903d3f5db44107f9cd7151c42ed22fff53f94e8.zip
Fix for improper String creation of url in URI creation
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java
index fd325176c..8af36adce 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/provider/jmdns/container/JMDNSDiscoveryContainer.java
@@ -380,6 +380,7 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
final int weight = serviceInfo.getWeight();
final Properties props = new Properties();
String uriProtocol = null;
+ String uriPath = null;
String namingAuthority = IServiceTypeID.DEFAULT_NA;
for (final Enumeration e = serviceInfo.getPropertyNames(); e.hasMoreElements();) {
final String key = (String) e.nextElement();
@@ -388,7 +389,7 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
} else if (NAMING_AUTHORITY_PROPERTY.equals(key)) {
namingAuthority = serviceInfo.getPropertyString(key);
} else if (URI_PATH_PROPERTY.equals(key)) {
- // nop (ServiceInfo already takes care)
+ uriPath = serviceInfo.getPropertyString(key);
} else {
final byte[] bytes = serviceInfo.getPropertyBytes(key);
try {
@@ -411,8 +412,8 @@ public class JMDNSDiscoveryContainer extends AbstractDiscoveryContainerAdapter i
final String[] scopes = new String[] {domain};
// uri
- final URI uri = new URI(serviceInfo.getURL(uriProtocol == null ? proto : uriProtocol));
-
+ String authority = serviceInfo.getHostAddress() + ":" + serviceInfo.getPort();
+ final URI uri = new URI(uriProtocol == null ? proto : uriProtocol, authority, uriPath, null, null);
// service type
String st = serviceInfo.getType();
final int end = st.indexOf(proto);

Back to the top