You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2008/04/04 21:07:09 UTC
svn commit: r644824 -
/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java
Author: rfeng
Date: Fri Apr 4 12:07:00 2008
New Revision: 644824
URL: http://svn.apache.org/viewvc?rev=644824&view=rev
Log:
Fix for TUSCANY-2193
Modified:
incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java
Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java?rev=644824&r1=644823&r2=644824&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java Fri Apr 4 12:07:00 2008
@@ -51,7 +51,6 @@
import org.apache.tuscany.sca.policy.IntentAttachPoint;
import org.apache.tuscany.sca.policy.IntentAttachPointType;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
public class CompositeConfigurationBuilderImpl {
private final static String SCA10_NS = "http://www.osoa.org/xmlns/sca/1.0";
@@ -471,21 +470,20 @@
}
// Reconcile interface
+ InterfaceContract interfaceContract = reference.getInterfaceContract();
if (componentReference.getInterfaceContract() != null) {
- if (!componentReference.getInterfaceContract().equals(reference
+ if (interfaceContract != null && !componentReference.getInterfaceContract().equals(reference
.getInterfaceContract())) {
- if (!interfaceContractMapper.isCompatible(reference.getInterfaceContract(),
- componentReference
- .getInterfaceContract())) {
+ if (!interfaceContractMapper.isCompatible(componentReference.getInterfaceContract(),
+ interfaceContract)) {
warning("Component reference interface incompatible with reference interface: " + component
- .getName()
- + "/"
- + componentReference.getName(),
- component);
+ .getName()
+ + "/"
+ + componentReference.getName(), component);
}
}
} else {
- componentReference.setInterfaceContract(reference.getInterfaceContract());
+ componentReference.setInterfaceContract(interfaceContract);
}
// Reconcile bindings
@@ -567,20 +565,19 @@
Service service = componentService.getService();
if (service != null) {
// Reconcile interface
+ InterfaceContract interfaceContract = service.getInterfaceContract();
if (componentService.getInterfaceContract() != null) {
- if (!componentService.getInterfaceContract().equals(service
- .getInterfaceContract())) {
- if (!interfaceContractMapper.isCompatible(componentService
- .getInterfaceContract(), service.getInterfaceContract())) {
+ if (interfaceContract != null && !componentService.getInterfaceContract().equals(interfaceContract)) {
+ if (!interfaceContractMapper.isCompatible(componentService.getInterfaceContract(),
+ interfaceContract)) {
warning("Component service interface incompatible with service interface: " + component
- .getName()
- + "/"
- + componentService.getName(),
- component);
+ .getName()
+ + "/"
+ + componentService.getName(), component);
}
}
} else {
- componentService.setInterfaceContract(service.getInterfaceContract());
+ componentService.setInterfaceContract(interfaceContract);
}
// Reconcile bindings
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org