summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/assembly/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-07-23 18:54:15 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-07-23 18:54:15 +0000
commit3c764a6565b76c491e7f14515a8418b9bffed75a (patch)
treef0be7d9c26b00fb9f63b0513575246758d7abf95 /java/sca/modules/assembly/src
parentfc85d70885e329374cd04f3e67e8fc1c828c1d11 (diff)
Remove duplicate requiredIntents/policySets fields and make a copy for the clone
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@797187 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/assembly/src')
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java2
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java15
2 files changed, 2 insertions, 15 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java
index 9bad01b653..03164f76b8 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java
@@ -66,6 +66,8 @@ public class ComponentTypeImpl extends ExtensibleImpl implements ComponentType,
for (Property property : getProperties()) {
clone.properties.add((Property)property.clone());
}
+ clone.requiredIntents = new ArrayList<Intent>(requiredIntents);
+ clone.policySets = new ArrayList<PolicySet>(policySets);
return clone;
}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java
index 181874039e..2be96b9792 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java
@@ -19,15 +19,10 @@
package org.apache.tuscany.sca.assembly.impl;
-import java.util.ArrayList;
-import java.util.List;
-
import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.Implementation;
import org.apache.tuscany.sca.policy.ExtensionType;
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.PolicySet;
import org.apache.tuscany.sca.policy.PolicySubject;
/**
@@ -38,22 +33,12 @@ import org.apache.tuscany.sca.policy.PolicySubject;
public abstract class ImplementationImpl extends ComponentTypeImpl implements Implementation, PolicySubject {
private QName type;
private ExtensionType extensionType;
- private List<PolicySet> policySets = new ArrayList<PolicySet>();
- private List<Intent> requiredIntents = new ArrayList<Intent>();
protected ImplementationImpl(QName type) {
super();
this.type = type;
}
- public List<PolicySet> getPolicySets() {
- return policySets;
- }
-
- public List<Intent> getRequiredIntents() {
- return requiredIntents;
- }
-
public ExtensionType getExtensionType() {
return extensionType;
}