Skip to content

Commit 4162b76

Browse files
committed
Polishing.
Use PositionFunction from OffsetScrollPosition. See: #3409 Original pull request: #3415
1 parent 0206de8 commit 4162b76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/ScrollDelegate.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public Window<T> scroll(Query query, Sort sort, ScrollPosition scrollPosition) {
7171
}
7272

7373
if (scrollPosition instanceof OffsetScrollPosition offset) {
74-
return createWindow(result, limit, OffsetScrollPosition.positionFunction(offset.isInitial() ? 0 : offset.getOffset()));
74+
return createWindow(result, limit, offset.positionFunction());
7575
}
7676

7777
throw new UnsupportedOperationException("ScrollPosition " + scrollPosition + " not supported");

0 commit comments

Comments
 (0)