diff options
author | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-15 15:50:40 +0000 |
---|---|---|
committer | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-15 15:50:40 +0000 |
commit | f4a1d08ee09312e7c00db765e393d178e398d6b1 (patch) | |
tree | 8f96090cf6b94904ec488af5a61934e8e03da0cf /sca-java-2.x/trunk/modules/assembly/src/main | |
parent | 70239a9382c582e6db0d2419b487745fd6672e75 (diff) |
Fix wrapper clone to include clone of unwrapped info.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1070946 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java index 9f083a4083..dfdc85d405 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java @@ -193,6 +193,28 @@ public class WrapperInfo implements Cloneable { if (outputWrapperType != null) { copy.outputWrapperType = (DataType<XMLType>)outputWrapperType.clone(); } + if (unwrappedInputType != null) { + List<DataType> clonedLogicalTypes = new ArrayList<DataType>(); + for (DataType t : unwrappedInputType.getLogical()) { + DataType type = (DataType) t.clone(); + clonedLogicalTypes.add(type); + } + DataType<List<DataType>> clonedUnwrappedInputType = + new DataTypeImpl<List<DataType>>(unwrappedInputType.getPhysical(), clonedLogicalTypes); + clonedUnwrappedInputType.setDataBinding(unwrappedInputType.getDataBinding()); + copy.unwrappedInputType = clonedUnwrappedInputType; + } + if (unwrappedOutputType != null) { + List<DataType> clonedLogicalTypes = new ArrayList<DataType>(); + for (DataType t : unwrappedOutputType.getLogical()) { + DataType type = (DataType) t.clone(); + clonedLogicalTypes.add(type); + } + DataType<List<DataType>> clonedUnwrappedOutputType = + new DataTypeImpl<List<DataType>>(unwrappedOutputType.getPhysical(), clonedLogicalTypes); + clonedUnwrappedOutputType.setDataBinding(unwrappedOutputType.getDataBinding()); + copy.unwrappedOutputType = clonedUnwrappedOutputType; + } return copy; } |