Skip to content

Commit 9224710

Browse files
committed
Unify return types in PageRequest.
first() and next() now retain PageRequest as return type to preserve the richer return type. Closes #2318
1 parent e47faf8 commit 9224710

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/springframework/data/domain/PageRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.springframework.util.Assert;
2121

2222
/**
23-
* Basic Java Bean implementation of {@code Pageable}.
23+
* Basic Java Bean implementation of {@link Pageable}.
2424
*
2525
* @author Oliver Gierke
2626
* @author Thomas Darimont
@@ -109,7 +109,7 @@ public Sort getSort() {
109109
* @see org.springframework.data.domain.Pageable#next()
110110
*/
111111
@Override
112-
public Pageable next() {
112+
public PageRequest next() {
113113
return new PageRequest(getPageNumber() + 1, getPageSize(), getSort());
114114
}
115115

@@ -127,7 +127,7 @@ public PageRequest previous() {
127127
* @see org.springframework.data.domain.Pageable#first()
128128
*/
129129
@Override
130-
public Pageable first() {
130+
public PageRequest first() {
131131
return new PageRequest(0, getPageSize(), getSort());
132132
}
133133

0 commit comments

Comments
 (0)