Skip to content

Commit

Permalink
Merge pull request #505 from gavinking/minor-fix
Browse files Browse the repository at this point in the history
fix to SliceRecord
  • Loading branch information
njr-11 authored Feb 29, 2024
2 parents 4fc8a93 + b602d28 commit 1dab0ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/main/java/jakarta/data/page/impl/SliceRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ public <E> PageRequest<E> pageRequest(Class<E> entityClass) {

@Override
public PageRequest<T> nextPageRequest() {
return pageRequest.next();
return moreResults ? pageRequest.next() : null;
}

@Override
@SuppressWarnings("unchecked")
public <E> PageRequest<E> nextPageRequest(Class<E> entityClass) {
return (PageRequest<E>) pageRequest.next();
return (PageRequest<E>) nextPageRequest();
}

@Override
Expand Down

0 comments on commit 1dab0ca

Please sign in to comment.