a power of two size for hashmap

This commit is contained in:
huqingfeng 2020-06-10 17:42:17 +08:00
parent f49eba341c
commit d21bbf4688

View File

@ -197,7 +197,7 @@ public class NamingProxy {
NAMING_LOGGER.info("[REGISTER-SERVICE] {} registering service {} with instance: {}", NAMING_LOGGER.info("[REGISTER-SERVICE] {} registering service {} with instance: {}",
namespaceId, serviceName, instance); namespaceId, serviceName, instance);
final Map<String, String> params = new HashMap<String, String>(9); final Map<String, String> params = new HashMap<String, String>(16);
params.put(CommonParams.NAMESPACE_ID, namespaceId); params.put(CommonParams.NAMESPACE_ID, namespaceId);
params.put(CommonParams.SERVICE_NAME, serviceName); params.put(CommonParams.SERVICE_NAME, serviceName);
params.put(CommonParams.GROUP_NAME, groupName); params.put(CommonParams.GROUP_NAME, groupName);