diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java index eb244a0209..b3e7ad5d2f 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java @@ -35,6 +35,7 @@ * Delegate to run {@link ScrollPosition scroll queries} and create result {@link Window}. * * @author Mark Paluch + * @author Yanming Zhou * @since 3.1 */ public class ScrollDelegate { @@ -90,7 +91,7 @@ private static Window createWindow(Sort sort, int limit, Direction direct return ScrollPosition.of(keys, direction); }; - return Window.from(delegate.getResultWindow(resultsToUse, limit), positionFunction, hasMoreElements(result, limit)); + return Window.from(resultsToUse, positionFunction, hasMoreElements(result, limit)); } private static Window createWindow(List result, int limit,