diff --git a/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java b/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java index 486d133623..a52692b9e5 100644 --- a/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java +++ b/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java @@ -93,7 +93,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.getRequiredComponentType().getType()));