diff options
author | mkuppe | 2009-02-19 07:42:22 +0000 |
---|---|---|
committer | mkuppe | 2009-02-19 07:42:22 +0000 |
commit | 0124efd386dca0dee584f6002d047d784fb64498 (patch) | |
tree | 95d36b17ba4516e7bb13be520e6456fa4d4c27f5 | |
parent | d68213568d2b88225fdd6ca9ba3afc1584493984 (diff) | |
download | org.eclipse.ecf-0124efd386dca0dee584f6002d047d784fb64498.tar.gz org.eclipse.ecf-0124efd386dca0dee584f6002d047d784fb64498.tar.xz org.eclipse.ecf-0124efd386dca0dee584f6002d047d784fb64498.zip |
NEW - bug 218308: [Discovery][jSLP] org.eclipse.ecf.discovery.IDiscoveryContainerAdapter.getServices() doesn't return all "reachable" services
https://bugs.eclipse.org/bugs/show_bug.cgi?id=218308
-rw-r--r-- | providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/LocatorDecoratorImpl.java | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/LocatorDecoratorImpl.java b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/LocatorDecoratorImpl.java index a1fc66ba0..de571c407 100644 --- a/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/LocatorDecoratorImpl.java +++ b/providers/bundles/org.eclipse.ecf.provider.jslp/src/org/eclipse/ecf/internal/provider/jslp/LocatorDecoratorImpl.java @@ -10,13 +10,9 @@ ******************************************************************************/ package org.eclipse.ecf.internal.provider.jslp; -import java.util.List; - import ch.ethz.iks.slp.*; import java.util.*; import org.eclipse.core.runtime.Assert; -import org.eclipse.ecf.core.util.StringUtils; -import org.eclipse.ecf.discovery.identity.IServiceTypeID; /** * This decorator add additional methods which will eventually be moved to jSLP itself @@ -89,34 +85,17 @@ public class LocatorDecoratorImpl implements LocatorDecorator { * @see org.eclipse.ecf.internal.provider.jslp.LocatorDecorator#getServiceURLs() */ public Map getServiceURLs() throws ServiceLocationException { - List scopeHints = getScopeHints(); - Enumeration stEnum = findServiceTypes(null, scopeHints); + Enumeration stEnum = findServiceTypes(null, null); Set aSet = new HashSet(Collections.list(stEnum)); Map result = new HashMap(); for (Iterator itr = aSet.iterator(); itr.hasNext();) { String type = (String) itr.next(); - ServiceLocationEnumeration services = findServices(new ServiceType(type), scopeHints, null); + ServiceLocationEnumeration services = findServices(new ServiceType(type), null, null); while (services.hasMoreElements()) { ServiceURL url = (ServiceURL) services.next(); - result.put(url, Collections.list(findAttributes(url, scopeHints, null))); + result.put(url, Collections.list(findAttributes(url, null, null))); } } return result; } - - //TODO because of https://bugs.eclipse.org/218308 as consumer is allowed to pass additional hints - private List getScopeHints() { - String hints = System.getProperty("net.slp.scopeHints"); //$NON-NLS-1$ - if (hints != null) { - hints = hints.toLowerCase(); - String[] scopes = StringUtils.split(hints, ","); //$NON-NLS-1$ - List scopeList = Arrays.asList(scopes); - List defaultScope = Arrays.asList(IServiceTypeID.DEFAULT_SCOPE); - List result = new ArrayList(); // j9 throws UnsupportedOperation on addAll on scopeList - result.addAll(defaultScope); - result.addAll(scopeList); - return result; - } - return null; - } } |