You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2011/03/16 11:27:16 UTC
svn commit: r1082114 -
/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
Author: slaws
Date: Wed Mar 16 10:27:16 2011
New Revision: 1082114
URL: http://svn.apache.org/viewvc?rev=1082114&view=rev
Log:
Be a bit more careful about dereferencing the DomainRegistryFactory endpointRegistries collection.
Modified:
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java?rev=1082114&r1=1082113&r2=1082114&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java Wed Mar 16 10:27:16 2011
@@ -337,11 +337,15 @@ public class AsyncResponseInvoker<T> imp
} // 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