File tree 1 file changed +2
-3
lines changed
src/main/java/org/springframework/data/domain
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ static OffsetScrollPosition initial() {
64
64
* @return will never be {@literal null}.
65
65
*/
66
66
static OffsetScrollPosition of (long offset ) {
67
+
67
68
Assert .isTrue (offset >= 0 , "Offset must not be negative" );
68
69
return new OffsetScrollPosition (offset );
69
70
}
@@ -77,7 +78,6 @@ static OffsetScrollPosition of(long offset) {
77
78
public static IntFunction <OffsetScrollPosition > positionFunction (long startOffset ) {
78
79
79
80
Assert .isTrue (startOffset >= 0 , "Start offset must not be negative" );
80
-
81
81
return startOffset == 0 ? OffsetPositionFunction .ZERO : new OffsetPositionFunction (startOffset );
82
82
}
83
83
@@ -114,8 +114,7 @@ public long getOffset() {
114
114
*/
115
115
public OffsetScrollPosition advanceBy (long delta ) {
116
116
117
- var value = isInitial () ? delta : offset + delta ;
118
-
117
+ long value = isInitial () ? delta : offset + delta ;
119
118
return new OffsetScrollPosition (value < 0 ? 0 : value );
120
119
}
121
120
You can’t perform that action at this time.
0 commit comments