From c2fce6e9632e5228faf33e5097ea3b3db8054b60 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Fri, 18 Sep 2009 23:06:29 +0000 Subject: [PATCH] polish git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1942 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../core/convert/support/CollectionGenericConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionGenericConverter.java b/org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionGenericConverter.java index f37ea2eeaf4..d9290109aa4 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/support/CollectionGenericConverter.java +++ b/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);