From 62c5f82420700c58bb6120c97d784b813ceba2f4 Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 29 Jan 2010 13:41:56 +0000 Subject: Fix domain name calculation git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@904492 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/tuscany/sca/node/NodeFactory.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sca-java-2.x/trunk/modules/node-api/src') diff --git a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java index 82d0304b78..8f7859367a 100644 --- a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java +++ b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java @@ -315,14 +315,17 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory { return createNode(configuration); } + /** + * TODO: cleanup node use of registry uri, domain uri, and domain name + * so that its consistent across the code base + */ public static String getDomainName(URI configURI) { - // no idea if this is needed, do it anyway for now till the Node refactor is done String s = configURI.getHost(); if (s == null) { s = configURI.getSchemeSpecificPart(); if (s != null) { - if (s.indexOf(':') > -1) { - s = s.substring(s.indexOf(':')+1); + if (s.indexOf('?') > -1) { + s = s.substring(0, s.indexOf('?')); } } } -- cgit v1.2.3