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 eb244a020..b3e7ad5d2 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 @@ import org.springframework.util.Assert; * 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 @@ public class ScrollDelegate { 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,