From f1b7741f65abdaa9de155057eb689b4af886d771 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sun, 21 Jul 2019 13:16:05 -0500 Subject: [PATCH] Fix for ConcurrentModificationException in markers code --- .../java/org/dynmap/markers/impl/MarkerSetImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerSetImpl.java b/DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerSetImpl.java index cfd53904..b6e6d536 100644 --- a/DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerSetImpl.java +++ b/DynmapCore/src/main/java/org/dynmap/markers/impl/MarkerSetImpl.java @@ -21,15 +21,15 @@ import org.dynmap.markers.MarkerSet; import org.dynmap.markers.impl.MarkerAPIImpl.MarkerUpdate; class MarkerSetImpl implements MarkerSet { - private HashMap markers = new HashMap(); - private HashMap areamarkers = new HashMap(); - private HashMap linemarkers = new HashMap(); - private HashMap circlemarkers = new HashMap(); + private ConcurrentHashMap markers = new ConcurrentHashMap(); + private ConcurrentHashMap areamarkers = new ConcurrentHashMap(); + private ConcurrentHashMap linemarkers = new ConcurrentHashMap(); + private ConcurrentHashMap circlemarkers = new ConcurrentHashMap(); private ConcurrentHashMap boostingareamarkers = null; private ConcurrentHashMap boostingcirclemarkers = null; private String setid; private String label; - private HashMap allowedicons = null; + private ConcurrentHashMap allowedicons = null; private boolean hide_by_def; private boolean ispersistent; private int prio = 0; @@ -51,7 +51,7 @@ class MarkerSetImpl implements MarkerSet { else label = id; if(iconlimit != null) { - allowedicons = new HashMap(); + allowedicons = new ConcurrentHashMap(); for(MarkerIcon ico : iconlimit) { if(ico instanceof MarkerIconImpl) { allowedicons.put(ico.getMarkerIconID(), (MarkerIconImpl)ico);