master
Keith Donald 15 years ago
parent 48bc060a77
commit d37c5aba94
  1. 2
      org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionGenericConverter.java

@ -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