diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-29 13:41:56 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-29 13:41:56 +0000 |
commit | 62c5f82420700c58bb6120c97d784b813ceba2f4 (patch) | |
tree | 0b6f2afe0c4d1d7041d5bf603170993b7f36a447 /sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java | |
parent | dfc25d579e4ea6a4f4a1ae04afffa7a19a316be3 (diff) |
Fix domain name calculation
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@904492 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java')
-rw-r--r-- | sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java | 9 |
1 files changed, 6 insertions, 3 deletions
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('?')); } } } |