Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2012-08-09 16:39:27 +0000
committerRoberto E. Escobar2012-08-09 16:39:27 +0000
commite9f6697a1aaf2c7192cf7639d8c3f7a60d47bfb9 (patch)
tree0cd7de0464a8821be3a96e0eff19b6a2d2e64d29
parente248ca65db9ac4139538286a8005e219560a834a (diff)
downloadorg.eclipse.osee-e9f6697a1aaf2c7192cf7639d8c3f7a60d47bfb9.tar.gz
org.eclipse.osee-e9f6697a1aaf2c7192cf7639d8c3f7a60d47bfb9.tar.xz
org.eclipse.osee-e9f6697a1aaf2c7192cf7639d8c3f7a60d47bfb9.zip
bug[ats_UZXZG]: AtsConfigCache Concurrent Modification Exception
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsConfigCache.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsConfigCache.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsConfigCache.java
index 1012c6b84bd..812616e5eb2 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsConfigCache.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsConfigCache.java
@@ -10,6 +10,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
import org.eclipse.osee.ats.api.IAtsConfigObject;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
@@ -36,8 +37,9 @@ public class AtsConfigCache {
@SuppressWarnings("unchecked")
public static final <A extends IAtsConfigObject> List<A> getByTag(String tag, Class<A> clazz) {
List<A> objs = new ArrayList<A>();
- Collection<IAtsConfigObject> values = tagToConfigObject.getValues(tag);
- if (values != null) {
+ if (tagToConfigObject.getValues(tag) != null) {
+ Collection<IAtsConfigObject> values =
+ new CopyOnWriteArrayList<IAtsConfigObject>(tagToConfigObject.getValues(tag));
for (IAtsConfigObject obj : values) {
if (clazz.isInstance(obj)) {
objs.add((A) obj);
@@ -49,8 +51,9 @@ public class AtsConfigCache {
@SuppressWarnings("unchecked")
public static final <A extends IAtsConfigObject> A getSoleByTag(String tag, Class<A> clazz) {
- Collection<IAtsConfigObject> values = tagToConfigObject.getValues(tag);
- if (values != null) {
+ if (tagToConfigObject.getValues(tag) != null) {
+ Collection<IAtsConfigObject> values =
+ new CopyOnWriteArrayList<IAtsConfigObject>(tagToConfigObject.getValues(tag));
for (IAtsConfigObject obj : values) {
if (clazz.isInstance(obj)) {
return (A) obj;

Back to the top