diff --git a/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java b/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java index b15b691553..8011f98ca1 100644 --- a/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java +++ b/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java @@ -89,7 +89,7 @@ private Object projectCollectionElements(Collection sources, TypeInformation< Class rawType = type.getType(); Collection result = CollectionFactory.createCollection(rawType.isArray() ? List.class : rawType, - sources.size()); + type.getComponentType().getType(), sources.size()); for (Object source : sources) { result.add(getProjection(source, type.getComponentType().getType()));