diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java b/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java index 0b64b1366e..6ec4b309ab 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java +++ b/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java @@ -26,7 +26,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; import org.springframework.core.ResolvableType; import org.springframework.core.convert.ConversionException; @@ -43,6 +42,7 @@ import org.springframework.core.convert.converter.GenericConverter; import org.springframework.core.convert.converter.GenericConverter.ConvertiblePair; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; +import org.springframework.util.ConcurrentReferenceHashMap; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; @@ -89,7 +89,7 @@ public class GenericConversionService implements ConfigurableConversionService { private final Converters converters = new Converters(); private final Map converterCache = - new ConcurrentHashMap(64); + new ConcurrentReferenceHashMap(64); // ConverterRegistry implementation