From 975bb64c4cc6661bd86be27d9455c6d953670dc6 Mon Sep 17 00:00:00 2001 From: Risto Lahtela <24460436+Rsl1122@users.noreply.github.com> Date: Sat, 28 Mar 2020 10:13:11 +0200 Subject: [PATCH] Added concurrency sort support to ConfigNode Affects issues: - Fixed #1382 --- .../java/com/djrapitops/plan/settings/config/ConfigNode.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/settings/config/ConfigNode.java b/Plan/common/src/main/java/com/djrapitops/plan/settings/config/ConfigNode.java index 763c4128d..4df36bc91 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/settings/config/ConfigNode.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/settings/config/ConfigNode.java @@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils; import java.io.IOException; import java.util.*; +import java.util.concurrent.CopyOnWriteArrayList; import java.util.stream.Collectors; /** @@ -54,7 +55,7 @@ public class ConfigNode { this.parent = parent; this.value = value; - nodeOrder = new ArrayList<>(); + nodeOrder = new CopyOnWriteArrayList<>(); childNodes = new HashMap<>(); comment = new ArrayList<>(); }