From 950b1837155e29f1a40060bee065dc31a0ded4b1 Mon Sep 17 00:00:00 2001 From: Angel Aguilera Date: Fri, 4 Jun 2021 10:48:44 +0200 Subject: [PATCH] Adjust expected IdentityHashMap sizes in ClassUtils Proposed change aimed to keep coherence between variable declaration and static initialization code, which stores 9 values, not 8, in these two maps. Closes gh-27016 --- .../src/main/java/org/springframework/util/ClassUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/util/ClassUtils.java b/spring-core/src/main/java/org/springframework/util/ClassUtils.java index 8b10785d0e9..c9fa24824af 100644 --- a/spring-core/src/main/java/org/springframework/util/ClassUtils.java +++ b/spring-core/src/main/java/org/springframework/util/ClassUtils.java @@ -88,13 +88,13 @@ public abstract class ClassUtils { * Map with primitive wrapper type as key and corresponding primitive * type as value, for example: Integer.class -> int.class. */ - private static final Map, Class> primitiveWrapperTypeMap = new IdentityHashMap<>(8); + private static final Map, Class> primitiveWrapperTypeMap = new IdentityHashMap<>(9); /** * Map with primitive type as key and corresponding wrapper * type as value, for example: int.class -> Integer.class. */ - private static final Map, Class> primitiveTypeToWrapperMap = new IdentityHashMap<>(8); + private static final Map, Class> primitiveTypeToWrapperMap = new IdentityHashMap<>(9); /** * Map with primitive type name as key and corresponding primitive