diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionToCollectionConverter.java b/org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionToCollectionConverter.java index 72e2480ace..0046d2b2bb 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionToCollectionConverter.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionToCollectionConverter.java @@ -57,7 +57,7 @@ final class CollectionToCollectionConverter implements ConditionalGenericConvert if (source == null) { return null; } - boolean isCopyRequired = !targetType.getType().isInstance(source); + boolean copyRequired = !targetType.getType().isInstance(source); Collection sourceCollection = (Collection) source; Collection target = CollectionFactory.createCollection(targetType.getType(), sourceCollection.size()); if (targetType.getElementTypeDescriptor() == null) { @@ -70,11 +70,11 @@ final class CollectionToCollectionConverter implements ConditionalGenericConvert Object targetElement = this.conversionService.convert(sourceElement, sourceType.elementTypeDescriptor(sourceElement), targetType.getElementTypeDescriptor()); target.add(targetElement); if (sourceElement != targetElement) { - isCopyRequired = true; + copyRequired = true; } } } - return isCopyRequired ? target : source; + return copyRequired ? target : source; } } diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/support/MapToMapConverter.java b/org.springframework.core/src/main/java/org/springframework/core/convert/support/MapToMapConverter.java index 284073ae4a..810a384abf 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/support/MapToMapConverter.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/support/MapToMapConverter.java @@ -57,7 +57,7 @@ final class MapToMapConverter implements ConditionalGenericConverter { if (source == null) { return null; } - boolean isCopyRequired = !targetType.getType().isInstance(source); + boolean copyRequired = !targetType.getType().isInstance(source); Map sourceMap = (Map) source; Map targetMap = CollectionFactory.createMap(targetType.getType(), sourceMap.size()); for (Map.Entry entry : sourceMap.entrySet()) { @@ -67,10 +67,10 @@ final class MapToMapConverter implements ConditionalGenericConverter { Object targetValue = convertValue(sourceValue, sourceType, targetType.getMapValueTypeDescriptor()); targetMap.put(targetKey, targetValue); if (sourceKey != targetKey || sourceValue != targetValue) { - isCopyRequired = true; + copyRequired = true; } } - return isCopyRequired ? targetMap : sourceMap; + return copyRequired ? targetMap : sourceMap; } // internal helpers