diff --git a/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java b/src/main/java/org/springframework/data/projection/ProjectingMethodInterceptor.java index 486d13362..a52692b9e 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 @@ class ProjectingMethodInterceptor implements MethodInterceptor { 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()));