diff options
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java index 1186da72f0..87b8da62a9 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java @@ -337,11 +337,15 @@ public class AsyncResponseInvoker<T> implements InvokerAsyncResponse, Serializab } // end for
} // end if
- // if there was no domainName to match, simply return the first EndpointRegistry...
- EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
+ // if there was no domainName to match, simply return the first EndpointRegistry if there is one...
+
+ if (domainRegistryFactory.getEndpointRegistries().size() > 0){
+ EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
+ return endpointRegistry;
+ } else {
+ return null;
+ }
-
- return endpointRegistry;
} // end method
} // end class
|