summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointRegistryImpl.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointRegistryImpl.java b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointRegistryImpl.java
index fbd8aea438..8e51068793 100644
--- a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointRegistryImpl.java
+++ b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointRegistryImpl.java
@@ -200,12 +200,16 @@ public class EndpointRegistryImpl implements EndpointRegistry, LifeCycleListener
public void stop() {
List<Endpoint> localEndpoints = endpoints.remove(this);
- for (Endpoint endpoint : localEndpoints) {
- removeEndpoint(endpoint);
+ if (localEndpoints != null) {
+ for (Endpoint endpoint : localEndpoints) {
+ removeEndpoint(endpoint);
+ }
}
List<EndpointReference> localEndpointReferences = endpointreferences.remove(this);
- for (EndpointReference endpointReference : localEndpointReferences) {
- removeEndpointReference(endpointReference);
+ if (localEndpointReferences != null) {
+ for (EndpointReference endpointReference : localEndpointReferences) {
+ removeEndpointReference(endpointReference);
+ }
}
listeners.clear();
}