tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r782798 - /tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java
Date Mon, 08 Jun 2009 21:39:43 GMT
Author: antelder
Date: Mon Jun  8 21:39:43 2009
New Revision: 782798

URL: http://svn.apache.org/viewvc?rev=782798&view=rev
Log:
Fix NPEs in RuntimeWireImpl2 when implementation.web in one node is wired to a service in
another node

Modified:
    tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java

Modified: tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java?rev=782798&r1=782797&r2=782798&view=diff
==============================================================================
--- tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java
(original)
+++ tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl2.java
Mon Jun  8 21:39:43 2009
@@ -315,6 +315,9 @@
     
     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 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(),



Mime
View raw message