diff options
author | kchong | 2013-07-24 17:33:01 +0000 |
---|---|---|
committer | kchong | 2013-07-24 17:33:01 +0000 |
commit | d6447251f4040177baa8b5a3f1579081ae89a695 (patch) | |
tree | b5c875347ab00818c1dea4abf1208133d95e2f9d | |
parent | 2e3743852d2f714a3aa77233e79ce7292683dd0d (diff) | |
download | webtools.webservices-d6447251f4040177baa8b5a3f1579081ae89a695.tar.gz webtools.webservices-d6447251f4040177baa8b5a3f1579081ae89a695.tar.xz webtools.webservices-d6447251f4040177baa8b5a3f1579081ae89a695.zip |
[BugĀ 413352] Restrict supported servers for client and service runtimes v201307241733R3_2_5_patches
-rw-r--r-- | bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/ClientRuntimeDescriptor.java | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/ClientRuntimeDescriptor.java b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/ClientRuntimeDescriptor.java index fe1554b03..31343645f 100644 --- a/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/ClientRuntimeDescriptor.java +++ b/bundles/org.eclipse.jst.ws.consumption.ui/src/org/eclipse/jst/ws/internal/consumption/ui/wsrt/ClientRuntimeDescriptor.java @@ -237,9 +237,25 @@ public class ClientRuntimeDescriptor public boolean isSupportedServer(String id) { if(!allowClientServerRestriction) return false; - if(supportedServers == null) { - String serverElements = elem.getAttribute("supportedServers"); - supportedServers = parseServers(serverElements); + + String serverElements = elem.getAttribute("supportedServers"); + // Extension defines supportedServers + if (supportedServers == null) + supportedServers = parseServers(serverElements); + // If the extension does not define supportedServers but defines unsupportedServers + // This is for the case when a server does not support a particular client runtime + if (serverElements == null) + { + String unsupportedServerElements = elem.getAttribute("unsupportedServers"); + if (unsupportedServers == null) + unsupportedServers = parseServers(unsupportedServerElements); + // If it is not in the unsupported list, then it must be supported, as extensions should + // not have to list off all the possible supported servers (and since currently only one + // of unsupportedServer or supportedServers is recognized). + if (!unsupportedServers.contains(id) && !supportedServers.contains(id)) + { + supportedServers.add(id); + } } return supportedServers.contains(id); } |