diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-04-30 04:41:23 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-04-30 04:41:23 +0000 |
commit | 1936c49187913656f82d289f5e72bdf536c142bf (patch) | |
tree | 28e8be318f54eafacde2ae09692a2b224394083e /branches | |
parent | f5f4db309b0e8d8cf0ec00f2f3920c78a4b85bb0 (diff) |
Fix the clone()
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@770061 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches')
-rw-r--r-- | branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java index 4348e08fcb..bebc9e3619 100644 --- a/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java +++ b/branches/sca-java-1.x/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java @@ -6,15 +6,15 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ package org.apache.tuscany.sca.assembly.impl; @@ -27,7 +27,7 @@ import org.apache.tuscany.sca.assembly.CompositeReference; /** * Represents a composite reference. - * + * * @version $Rev$ $Date$ */ public class CompositeReferenceImpl extends ReferenceImpl implements CompositeReference, Cloneable { @@ -38,10 +38,12 @@ public class CompositeReferenceImpl extends ReferenceImpl implements CompositeRe */ protected CompositeReferenceImpl() { } - + @Override public Object clone() throws CloneNotSupportedException { - return super.clone(); + CompositeReferenceImpl copy = (CompositeReferenceImpl)super.clone(); + copy.promotedReferences = new ArrayList<ComponentReference>(promotedReferences); + return copy; } public List<ComponentReference> getPromotedReferences() { |