Pārlūkot izejas kodu

fix concurrentModification

jascha Bohne 8 gadi atpakaļ
vecāks
revīzija
aff9246d01

+ 1 - 4
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/io/GraphMLImporter.java

@@ -73,11 +73,8 @@ public class GraphMLImporter {
 			if (!n.hasAttribute("long")) {
 				n.addAttribute("long", OptionsManager.getDefaultLong());
 			}
-<<<<<<< HEAD
-			if (!n.hasAttribute("ui.label") && n.hasAttribute("yEd.label")) {
-=======
+
 			if (!n.hasAttribute("ui.label") && n.hasAttribute("yEd.label")){
->>>>>>> branch 'Jascha' of https://git.tk.informatik.tu-darmstadt.de/julien.gedeon/bp-scopviz.git
 				n.addAttribute("ui.label", n.getAttribute("yEd.label").toString());
 				n.removeAttribute("yEd.label");
 			}

+ 6 - 1
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/PropertiesManager.java

@@ -216,7 +216,12 @@ public final class PropertiesManager {
 		}
 
 		ObservableList<KeyValuePair> newData = FXCollections.observableArrayList();
-		for (String key : selected.getAttributeKeySet()) {
+		//fix for concurrentModification exception
+		String[] temp = new String[0];
+		temp = selected.getAttributeKeySet().toArray(temp);
+		Debug.out(temp.length);
+		for (int i = 0; i<temp.length; i++) {
+			String key = temp[i];
 			switch (key) {
 			// filter out or change attributes added by graphstream that are of
 			// no use to the user