intents and policySets specified on implementation.composite elements were being lost

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@966706 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
bdaniel 2010-07-22 15:23:56 +00:00
commit d0a63dd5b9

View file

@ -1098,8 +1098,17 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
//now resolve the implementation so that even if there is a shared instance
//for this that is resolved, the specified intents and policysets are safe in the
//component and not lost
List<Intent> intents = implementation.getRequiredIntents();
List<PolicySet> policySets = implementation.getPolicySets();
implementation = resolveImplementation(implementation, resolver, context);
implementation.getPolicySets().clear();
implementation.getPolicySets().addAll(policySets);
implementation.getRequiredIntents().clear();
implementation.getRequiredIntents().addAll(intents);
component.setImplementation(implementation);
}