Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan E. Cook2017-05-13 15:31:16 -0400
committerMorgan Cook2017-05-15 19:58:06 -0400
commit61f184fc3d9aa7f8dbe4ab454e3d16675500b946 (patch)
tree6257c45f0ef2ebd174091a130e271570dfb2864f
parentd58db0792397ccaf0788276bce487e80b8447551 (diff)
downloadorg.eclipse.osee-61f184fc3d9aa7f8dbe4ab454e3d16675500b946.tar.gz
org.eclipse.osee-61f184fc3d9aa7f8dbe4ab454e3d16675500b946.tar.xz
org.eclipse.osee-61f184fc3d9aa7f8dbe4ab454e3d16675500b946.zip
bug: Fix obj not supported error when creating new versions
Signed-off-by: Morgan E. Cook <morgan.e.cook@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java
index 1df4c82e7d..12c5de4376 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java
@@ -41,7 +41,7 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions;
public abstract class AbstractAtsChangeSet implements IAtsChangeSet {
protected String comment;
- protected final List<AtsRelationChange> relations = new ArrayList<>();
+ protected final Set<AtsRelationChange> relations = new CopyOnWriteArraySet<>();
protected final Set<IAtsObject> atsObjects = new CopyOnWriteArraySet<>();
protected final Set<ArtifactId> artifacts = new CopyOnWriteArraySet<>();
protected final Set<IAtsObject> deleteAtsObjects = new CopyOnWriteArraySet<>();
@@ -70,6 +70,8 @@ public abstract class AbstractAtsChangeSet implements IAtsChangeSet {
atsObjects.add((IAtsObject) obj);
} else if (obj instanceof ArtifactId) {
artifacts.add((ArtifactId) obj);
+ } else if (obj instanceof AtsRelationChange) {
+ relations.add((AtsRelationChange) obj);
} else {
throw new OseeArgumentException("Object not supported: " + obj);
}
@@ -89,6 +91,7 @@ public abstract class AbstractAtsChangeSet implements IAtsChangeSet {
@Override
public void clear() {
+ relations.clear();
atsObjects.clear();
artifacts.clear();
deleteArtifacts.clear();
@@ -104,7 +107,7 @@ public abstract class AbstractAtsChangeSet implements IAtsChangeSet {
@Override
public boolean isEmpty() {
- return artifacts.isEmpty() && deleteArtifacts.isEmpty() && atsObjects.isEmpty() && deleteAtsObjects.isEmpty();
+ return artifacts.isEmpty() && deleteArtifacts.isEmpty() && atsObjects.isEmpty() && deleteAtsObjects.isEmpty() && relations.isEmpty();
}
@Override

Back to the top