From 5f8e76c61c852f1fdc627bb59a6998bd4151551c Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 3 May 2013 14:15:02 +1000 Subject: [PATCH] Revert "ConcurrentHashMap is junk - lets stick to standard unless issues arise." This reverts commit 5d1a2c59a7ff9c1c1542256d453e3e307304ee37 and closes #304 --- .../main/java/net/md_5/bungee/YamlReconnectHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/YamlReconnectHandler.java b/proxy/src/main/java/net/md_5/bungee/YamlReconnectHandler.java index 4a2451503..47c6bf148 100644 --- a/proxy/src/main/java/net/md_5/bungee/YamlReconnectHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/YamlReconnectHandler.java @@ -6,8 +6,8 @@ import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.net.InetSocketAddress; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Level; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ReconnectHandler; @@ -41,7 +41,10 @@ public class YamlReconnectHandler implements ReconnectHandler if ( data == null ) { - data = new HashMap<>(); + data = new ConcurrentHashMap<>(); + } else + { + data = new ConcurrentHashMap<>( data ); } }