Skip to content

Commit 35297df

Browse files
DiegoKrupitzamp911de
authored andcommitted
Update documentation for repository Pageable and Sort arguments.
Replace outdated `null` acceptance for `Pageable` with `Pageable.unpaged()` `QueryByExampleExecutor#findAll(Example<S> example, Pageable pageable)` should does not accept null values since there is `Pageable.unpaged()`. Furthermore, the same applies to `PagingAndSortingRepository#findAll(Pageable pageable)`. Related ticket: spring-projects/spring-data-jpa/issues/2464 Closes #2574
1 parent 40475b1 commit 35297df

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/org/springframework/data/repository/PagingAndSortingRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public interface PagingAndSortingRepository<T, ID> extends CrudRepository<T, ID>
4242
/**
4343
* Returns a {@link Page} of entities meeting the paging restriction provided in the {@code Pageable} object.
4444
*
45-
* @param pageable
45+
* @param pageable must not be {@literal null}.
4646
* @return a page of entities
4747
*/
4848
Page<T> findAll(Pageable pageable);

src/main/java/org/springframework/data/repository/query/QueryByExampleExecutor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* @param <T>
3030
* @author Mark Paluch
3131
* @author Christoph Strobl
32+
* @author Diego Krupitza
3233
* @since 1.12
3334
*/
3435
public interface QueryByExampleExecutor<T> {
@@ -67,7 +68,7 @@ public interface QueryByExampleExecutor<T> {
6768
* {@link Page} is returned.
6869
*
6970
* @param example must not be {@literal null}.
70-
* @param pageable can be {@literal null}.
71+
* @param pageable must not be {@literal null}.
7172
* @return a {@link Page} of entities matching the given {@link Example}.
7273
*/
7374
<S extends T> Page<S> findAll(Example<S> example, Pageable pageable);

0 commit comments

Comments
 (0)