Skip to content

Commit 2f3aca4

Browse files
committed
Refine documentation for PageableExecutionUtils.
Closes #2492
1 parent 623f055 commit 2f3aca4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/java/org/springframework/data/repository/support/PageableExecutionUtils.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ private PageableExecutionUtils() {}
4242
* optimizations. The construction of {@link Page} omits a count query if the total can be determined based on the
4343
* result size and {@link Pageable}.
4444
*
45-
* @param content must not be {@literal null}.
45+
* @param content result of a query with applied {@link Pageable}. The list must not be {@literal null} and must
46+
* contain up to {@link Pageable#getPageSize()} items.
4647
* @param pageable must not be {@literal null}.
4748
* @param totalSupplier must not be {@literal null}.
48-
* @return the {@link Page}.
49+
* @return the {@link Page} for {@link List content} and a total size.
4950
*/
5051
public static <T> Page<T> getPage(List<T> content, Pageable pageable, LongSupplier totalSupplier) {
5152
return org.springframework.data.support.PageableExecutionUtils.getPage(content, pageable, totalSupplier);

src/main/java/org/springframework/data/support/PageableExecutionUtils.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ private PageableExecutionUtils() {}
4242
* optimizations. The construction of {@link Page} omits a count query if the total can be determined based on the
4343
* result size and {@link Pageable}.
4444
*
45-
* @param content must not be {@literal null}.
45+
* @param content result of a query with applied {@link Pageable}. The list must not be {@literal null} and must
46+
* contain up to {@link Pageable#getPageSize()} items.
4647
* @param pageable must not be {@literal null}.
4748
* @param totalSupplier must not be {@literal null}.
48-
* @return the {@link Page}.
49+
* @return the {@link Page} for {@link List content} and a total size.
4950
*/
5051
public static <T> Page<T> getPage(List<T> content, Pageable pageable, LongSupplier totalSupplier) {
5152

0 commit comments

Comments
 (0)