diff options
author | 2021-08-11 03:10:42 +0200 | |
---|---|---|
committer | 2021-08-11 03:10:42 +0200 | |
commit | a3054abf814d06365e1d5e269ff9e3c312db375d (patch) | |
tree | 256bfcb4a5fef2e610bbe118d2c40875a2a4f954 /model-data | |
parent | Model put returns old value (diff) | |
download | refinery-a3054abf814d06365e1d5e269ff9e3c312db375d.tar.gz refinery-a3054abf814d06365e1d5e269ff9e3c312db375d.tar.zst refinery-a3054abf814d06365e1d5e269ff9e3c312db375d.zip |
Potential concurrent modification exception in multithread env resolved
Diffstat (limited to 'model-data')
-rw-r--r-- | model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java b/model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java index 38aaccc1..5955f7a6 100644 --- a/model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java +++ b/model-data/src/main/java/org/eclipse/viatra/solver/data/model/ModelStoreImpl.java | |||
@@ -106,7 +106,7 @@ public class ModelStoreImpl implements ModelStore { | |||
106 | public synchronized Set<Long> getStates() { | 106 | public synchronized Set<Long> getStates() { |
107 | // if not empty, return first | 107 | // if not empty, return first |
108 | for(VersionedMapStore<?, ?> store : stores.values()) { | 108 | for(VersionedMapStore<?, ?> store : stores.values()) { |
109 | return store.getStates(); | 109 | return new HashSet<>(store.getStates()); |
110 | } | 110 | } |
111 | // if empty | 111 | // if empty |
112 | Set<Long> result = new HashSet<>(); | 112 | Set<Long> result = new HashSet<>(); |