diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-15 16:00:49 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-15 16:00:49 +0000 |
commit | a99e7c2d1708ba8bb1598c54571dcf540308b03b (patch) | |
tree | 3bf880baee1a2bfd8ed3dc7e22aaf2ac1eefbdc3 /sca-java-2.x/trunk/modules/binding-sca-runtime/src/main | |
parent | a3f65cdd91e5c5905df5a7a228ff0f49424d4d37 (diff) |
TUSCANY-3916 - Check for null interface. I need to find out why a null interface is possible but it's causing the build to break so I'll double back to this
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1157897 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-sca-runtime/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DefaultSCABindingMapper.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DefaultSCABindingMapper.java b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DefaultSCABindingMapper.java index d1af962846..0b16117635 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DefaultSCABindingMapper.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/DefaultSCABindingMapper.java @@ -41,6 +41,7 @@ import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.extensibility.ServiceDeclarationParser; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.policy.PolicySubject; import org.apache.tuscany.sca.provider.ProviderFactory; import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint; @@ -263,10 +264,12 @@ public class DefaultSCABindingMapper implements SCABindingMapper { * @return */ protected QName chooseBinding(RuntimeEndpoint endpoint) { - if(endpoint.getService().getInterfaceContract() != null - && ((RuntimeComponentService)endpoint.getService()).getInterfaceContract().getInterface().isRemotable() - && supportsDistributedSCA - && isBindingSupported(defaultMappedBinding)) { + InterfaceContract interfaceContract = endpoint.getService().getInterfaceContract(); + if(interfaceContract != null + && interfaceContract.getInterface() != null + && interfaceContract.getInterface().isRemotable() + && supportsDistributedSCA + && isBindingSupported(defaultMappedBinding)) { return defaultMappedBinding; } |