Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @author Thomas Darimont
* @author Anastasiia Smirnova
* @author Mark Paluch
* @author Artur Signell
*/
public class PageRequest extends AbstractPageRequest {

Expand Down Expand Up @@ -118,7 +119,7 @@ public Pageable next() {
* @see org.springframework.data.domain.AbstractPageRequest#previous()
*/
@Override
public PageRequest previous() {
public Pageable previous() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should rather change the other methods to return PageRequest as that is the more concrete type and we retain type-safety. Care to have a look?

return getPageNumber() == 0 ? this : new PageRequest(getPageNumber() - 1, getPageSize(), getSort());
}

Expand Down