Fix ASM_5031, wire with @replace=true overrides reference @target attribute
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@807545 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3735ba152a
commit
5fffa71fd0
1 changed files with 3 additions and 0 deletions
|
@ -159,6 +159,9 @@ public class ComponentReferenceWireBuilderImpl extends BaseBuilderImpl implement
|
|||
.isCompatible(resolvedReference.getInterfaceContract(), resolvedService.getInterfaceContract())) {
|
||||
|
||||
//resolvedReference.getTargets().add(resolvedService);
|
||||
if (wire.isReplace()) {
|
||||
resolvedReference.getTargets().clear();
|
||||
}
|
||||
resolvedReference.getTargets().add(wire.getTarget());
|
||||
} else {
|
||||
warning(monitor, "WireIncompatibleInterface", composite, source.getName(), target.getName());
|
||||
|
|
Loading…
Add table
Reference in a new issue