From d0758e877cdb2641c5c8c808b70c52e39ed3d9cf Mon Sep 17 00:00:00 2001 From: "jinhui.zhao" Date: Mon, 29 Oct 2018 18:23:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?modify=20ConcurrentHashMap=20to=20HashMap.?= =?UTF-8?q?=E8=BF=99=E9=87=8CREGISTRIES=E5=9C=A8=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E9=83=BD=E4=BC=9A=E5=85=88=E5=8A=A0?= =?UTF-8?q?=E9=94=81=EF=BC=8C=E4=B8=8D=E5=AD=98=E5=9C=A8=E5=A4=9A=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E5=AE=89=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= =?UTF-8?q?=E6=89=80=E4=BB=A5=E8=BF=99=E9=87=8C=E5=BB=BA=E8=AE=AE=E4=BD=BF?= =?UTF-8?q?=E7=94=A8hashmap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apache/dubbo/registry/support/AbstractRegistryFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java index 8347d9a687f..420cff6255a 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java @@ -26,6 +26,7 @@ import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.ReentrantLock; @@ -44,7 +45,7 @@ public abstract class AbstractRegistryFactory implements RegistryFactory { private static final ReentrantLock LOCK = new ReentrantLock(); // Registry Collection Map - private static final Map REGISTRIES = new ConcurrentHashMap(); + private static final Map REGISTRIES = new HashMap<>(); /** * Get all registries From 1309b1112e39587c04e7d02f9246df80eaba6c9f Mon Sep 17 00:00:00 2001 From: "jinhui.zhao" Date: Mon, 29 Oct 2018 21:52:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?modify=20ConcurrentHashMap=20to=20HashMap.?= =?UTF-8?q?=E8=BF=99=E9=87=8CREGISTRIES=E5=9C=A8=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E9=83=BD=E4=BC=9A=E5=85=88=E5=8A=A0?= =?UTF-8?q?=E9=94=81=EF=BC=8C=E4=B8=8D=E5=AD=98=E5=9C=A8=E5=A4=9A=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E5=AE=89=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= =?UTF-8?q?=E6=89=80=E4=BB=A5=E8=BF=99=E9=87=8C=E5=BB=BA=E8=AE=AE=E4=BD=BF?= =?UTF-8?q?=E7=94=A8hashmap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apache/dubbo/registry/support/AbstractRegistryFactory.java | 1 - 1 file changed, 1 deletion(-) diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java index 420cff6255a..64647f4ba60 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/support/AbstractRegistryFactory.java @@ -28,7 +28,6 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.locks.ReentrantLock; /**