diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-08 21:39:43 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-08 21:39:43 +0000 |
commit | fe46ff50ea80c96adc552d3dda232834a20f159f (patch) | |
tree | cf637f63e553db09741dd5a4416d69e467b4601a /java/sca | |
parent | 294f9cdbc23f6585b438b746007289c089b47203 (diff) |
Fix NPEs in RuntimeWireImpl2 when implementation.web in one node is wired to a service in another node
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@782798 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r-- | java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java index 3911d6dd49..ab03645182 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java @@ -315,6 +315,9 @@ public class RuntimeWireImpl2 implements RuntimeWire { private InterfaceContract getInterfaceContract(ComponentReference reference, Binding binding) { InterfaceContract interfaceContract = reference.getInterfaceContract(); + if (interfaceContract == null) { + interfaceContract = endpoint.getInterfaceContract(); + } ReferenceBindingProvider provider = ((RuntimeComponentReference)reference).getBindingProvider(binding); if (provider != null) { InterfaceContract bindingContract = provider.getBindingInterfaceContract(); @@ -419,6 +422,8 @@ public class RuntimeWireImpl2 implements RuntimeWire { public EndpointReference getTarget() { // TODO - EPR convert this into method that returns Endpoint2 + Endpoint2 endpoint = this.endpoint != null ? this.endpoint : endpointReference.getTargetEndpoint(); + // convert the target info into old endpoint reference format EndpointReference epr = new EndpointReferenceImpl((RuntimeComponent)endpoint.getComponent(), endpoint.getService(), |