Browse Source

polish

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1942 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Keith Donald 17 years ago
parent
commit
c2fce6e963
  1. 2
      org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionGenericConverter.java

2
org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionGenericConverter.java

@ -134,7 +134,7 @@ class CollectionGenericConverter implements GenericConverter { @@ -134,7 +134,7 @@ class CollectionGenericConverter implements GenericConverter {
TypeDescriptor targetElementType = targetType.getElementTypeDescriptor();
if (sourceElementType == TypeDescriptor.NULL || sourceElementType.isAssignableTo(targetElementType)) {
if (sourceType.isAssignableTo(targetType)) {
return source;
return sourceCollection;
} else {
Collection targetCollection = CollectionFactory.createCollection(targetType.getType(), sourceCollection.size());
targetCollection.addAll(sourceCollection);

Loading…
Cancel
Save