summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/sca-client-impl/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/sca-client-impl/src/main')
-rw-r--r--java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java b/java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java
index 0f4c661f35..c72938d849 100644
--- a/java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java
+++ b/java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.client.impl;
@@ -29,7 +29,11 @@ import org.oasisopen.sca.client.SCAClient;
public class SCAClientImpl implements SCAClient {
- public <T> T getService(Class<T> serviceInterface, String serviceName, URI domainURI) throws NoSuchServiceException, NoSuchDomainException {
+ public <T> T getService(Class<T> serviceInterface, String serviceName, URI domainURI)
+ throws NoSuchServiceException, NoSuchDomainException {
+ if (domainURI == null) {
+ domainURI = URI.create(Node.DEFAULT_DOMAIN_URI);
+ }
Node node = NodeFinder.getNode(domainURI);
if (node == null) {
throw new NoSuchDomainException(domainURI.toString());