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 8347d9a687fa..64647f4ba60d 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,8 +26,8 @@ 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 +44,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