]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Fix introduced ConcurrentModficationException
authorMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 6 Apr 2017 15:02:33 +0000 (18:02 +0300)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 6 Apr 2017 15:02:33 +0000 (18:02 +0300)
refs #7045

Change-Id: Ib93731f246193505ec1bddc4e38928312b11981d

org.simantics.interop.update/src/org/simantics/interop/update/editor/ModelUpdateEditor.java

index 0881a7bbd44aa5ecf6286a97cb7a96632b36893a..4c172997bd1068f490dd267b86f125760e3af021 100644 (file)
@@ -558,7 +558,8 @@ public abstract class ModelUpdateEditor extends Composite{
                        public void perform(WriteGraph graph) throws DatabaseException {
                                Layer0Utils.addCommentMetadata(graph, "Apply selected model updates");
                                graph.markUndoPoint();
-                               for (Pair<Statement, Statement> mod : updateList.getSelected()) {
+                               HashSet<Pair<Statement, Statement>> changes = new HashSet<>(updateList.getSelected());
+                               for (Pair<Statement, Statement> mod : changes) {
                                        updateList.removeChange(mod);
                                        applyLiteralChange(graph, mod);
                                }