You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by hy...@apache.org on 2019/09/09 11:19:25 UTC
[dubbo] branch master updated: Avoid resize in ClassUtils.java
(#5009)
This is an automated email from the ASF dual-hosted git repository.
hyunkun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 8b1f60a Avoid resize in ClassUtils.java (#5009)
8b1f60a is described below
commit 8b1f60adcc5bc5b17b371bb8f83757637408ef49
Author: fanghuabing <fa...@163.com>
AuthorDate: Mon Sep 9 19:19:18 2019 +0800
Avoid resize in ClassUtils.java (#5009)
---
.../src/main/java/org/apache/dubbo/common/utils/ClassUtils.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassUtils.java
index 10b6b9a..ec5b766 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassUtils.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ClassUtils.java
@@ -37,12 +37,12 @@ public class ClassUtils {
* Map with primitive type name as key and corresponding primitive type as
* value, for example: "int" -> "int.class".
*/
- private static final Map<String, Class<?>> PRIMITIVE_TYPE_NAME_MAP = new HashMap<String, Class<?>>(16);
+ private static final Map<String, Class<?>> PRIMITIVE_TYPE_NAME_MAP = new HashMap<String, Class<?>>(32);
/**
* Map with primitive wrapper type as key and corresponding primitive type
* as value, for example: Integer.class -> int.class.
*/
- private static final Map<Class<?>, Class<?>> PRIMITIVE_WRAPPER_TYPE_MAP = new HashMap<Class<?>, Class<?>>(8);
+ private static final Map<Class<?>, Class<?>> PRIMITIVE_WRAPPER_TYPE_MAP = new HashMap<Class<?>, Class<?>>(16);
private static final char PACKAGE_SEPARATOR_CHAR = '.';
@@ -56,7 +56,7 @@ public class ClassUtils {
PRIMITIVE_WRAPPER_TYPE_MAP.put(Long.class, long.class);
PRIMITIVE_WRAPPER_TYPE_MAP.put(Short.class, short.class);
- Set<Class<?>> primitiveTypeNames = new HashSet<>(16);
+ Set<Class<?>> primitiveTypeNames = new HashSet<>(32);
primitiveTypeNames.addAll(PRIMITIVE_WRAPPER_TYPE_MAP.values());
primitiveTypeNames.addAll(Arrays
.asList(boolean[].class, byte[].class, char[].class, double[].class,