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 f981d44d36..e113ad1632 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 @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -503,7 +503,7 @@ public class GenericConversionService implements ConfigurableConversionService { private final Set globalConverters = new LinkedHashSet(); private final Map converters = - new LinkedHashMap(36); + new LinkedHashMap(256); public void add(GenericConverter converter) { Set convertibleTypes = converter.getConvertibleTypes(); @@ -514,8 +514,7 @@ public class GenericConversionService implements ConfigurableConversionService { } else { for (ConvertiblePair convertiblePair : convertibleTypes) { - ConvertersForPair convertersForPair = getMatchableConverters(convertiblePair); - convertersForPair.add(converter); + getMatchableConverters(convertiblePair).add(converter); } } }