From d5a80d277764cd4f0f05f9ba58dfde5af117ba16 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 2 Dec 2020 17:44:09 +0100 Subject: [PATCH] Polishing (aligned with 5.2.x) --- .../core/convert/support/GenericConversionService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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); } } }