diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-16 08:20:24 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-16 08:20:24 +0000 |
commit | 64fa14787b2b4b7b30756a360a34a55631e592f6 (patch) | |
tree | 59c7f69a3cc58ec8ac7ce63b78704d9ef66cb1a5 /sca-java-2.x/trunk/modules/assembly-xml/src/main/java | |
parent | e96dd3904b142b0dc9d2313a4ee5d6327774469f (diff) |
TUSCANY-4028 - don't duplicate intents on the Java implementation model
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1301369 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly-xml/src/main/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java index e32171a0ee..4b2f32c4c2 100644 --- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java +++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java @@ -1106,7 +1106,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt //for this that is resolved, the specified intents and policysets are safe in the //component and not lost - List<PolicySet> policySets = new ArrayList<PolicySet>(implementation.getPolicySets()); + List<PolicySet> policySets = new ArrayList<PolicySet>(implementation.getPolicySets()); List<Intent> intents = new ArrayList<Intent>(implementation.getRequiredIntents()); implementation = resolveImplementation(implementation, resolver, context); @@ -1117,7 +1117,15 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt implementation.getPolicySets().addAll(policySets); } - implementation.getRequiredIntents().addAll(intents); + //implementation.getRequiredIntents().addAll(intents); + + // Make sure we don't repeat any intents that are already on the + // resolved implementation + for (Intent intent : intents){ + if (!implementation.getRequiredIntents().contains(intent)){ + implementation.getRequiredIntents().add(intent); + } + } // resolve any policy on implementation operations for (Operation op : implementation.getOperations()){ |