From 2b10aebb76457ce79fd54c4ca196bbc08e8d2ea9 Mon Sep 17 00:00:00 2001 From: jiangcaijun Date: Sun, 26 Apr 2020 17:19:18 +0800 Subject: [PATCH] hashMap constructor : choose more appropriate initialCapacity --- .../alibaba/nacos/naming/misc/ServiceStatusSynchronizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/ServiceStatusSynchronizer.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/ServiceStatusSynchronizer.java index 1897a59ab..0494a2151 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/ServiceStatusSynchronizer.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/ServiceStatusSynchronizer.java @@ -73,7 +73,7 @@ public class ServiceStatusSynchronizer implements Synchronizer { return null; } - Map params = new HashMap<>(10); + Map params = new HashMap<>(1); params.put("key", key);