Skip to content

Commit

Permalink
absolute(..) MockCursor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Amaneusz committed Nov 17, 2023
1 parent 07b4574 commit 281fc08
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ public boolean relative(long amount) {
*/
@Override
public boolean absolute(long position) {
currentPos = (int) position;
if (position < -1) {
beforeFirst();
} else if (position > items.size()) {
afterLast();
} else {
currentPos = (int) position;
}
return isPositionValid();
}

Expand Down

0 comments on commit 281fc08

Please sign in to comment.