summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-19 23:40:07 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-19 23:40:07 +0000
commit9d0b2458047f80a76274ea2d4acc9d948fe81850 (patch)
tree8263e7965dbde6329ee52e48ef1d0c24eb0c2852 /java/sca
parent420526884c2571aa4b17c69e98128bfd0612046e (diff)
Fix the NPE when callback is not present
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@756264 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java4
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java9
2 files changed, 3 insertions, 10 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java
index b4d2c0d9ea..1dc7af226a 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java
@@ -138,7 +138,9 @@ public class ComponentServiceEndpointBuilderImpl implements CompositeBuilder {
endpoint.setComponent(endpointComponent);
endpoint.setService(endpointService);
endpoint.setBinding(binding);
- endpoint.getCallbackEndpointReferences().addAll(callbackEndpointReferences);
+ if (callbackEndpointReferences != null) {
+ endpoint.getCallbackEndpointReferences().addAll(callbackEndpointReferences);
+ }
endpoint.setUnresolved(false);
service.getEndpoints().add(endpoint);
}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java
index 79434bd041..eb3b87dec0 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java
@@ -108,15 +108,6 @@ public class Endpoint2Impl implements Endpoint2 {
return callbackEndpointReferences;
}
- /**
- * Set the reference callback endpoint refefences
- *
- * @param callbackEndpoint the reference callback endpoint
- */
- public void setCallbackEndpointReferences(List<EndpointReference2> callbackEndpointReferences)
- {
- this.callbackEndpointReferences = callbackEndpointReferences;
- }
/*
public String getURI() {
return uri;