File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/main/java/org/springframework/data/domain Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ static OffsetScrollPosition initial() {
6464 * @return will never be {@literal null}.
6565 */
6666 static OffsetScrollPosition of (long offset ) {
67+
6768 Assert .isTrue (offset >= 0 , "Offset must not be negative" );
6869 return new OffsetScrollPosition (offset );
6970 }
@@ -77,7 +78,6 @@ static OffsetScrollPosition of(long offset) {
7778 public static IntFunction <OffsetScrollPosition > positionFunction (long startOffset ) {
7879
7980 Assert .isTrue (startOffset >= 0 , "Start offset must not be negative" );
80-
8181 return startOffset == 0 ? OffsetPositionFunction .ZERO : new OffsetPositionFunction (startOffset );
8282 }
8383
@@ -114,8 +114,7 @@ public long getOffset() {
114114 */
115115 public OffsetScrollPosition advanceBy (long delta ) {
116116
117- var value = isInitial () ? delta : offset + delta ;
118-
117+ long value = isInitial () ? delta : offset + delta ;
119118 return new OffsetScrollPosition (value < 0 ? 0 : value );
120119 }
121120
You can’t perform that action at this time.
0 commit comments