From 55b83dfa839ee58b059be95ae209e01590c70ad4 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 9 Nov 2021 14:47:59 +0100 Subject: [PATCH] Refine documentation for PageableExecutionUtils. Closes #2492 --- .../data/repository/support/PageableExecutionUtils.java | 5 +++-- .../springframework/data/support/PageableExecutionUtils.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/springframework/data/repository/support/PageableExecutionUtils.java b/src/main/java/org/springframework/data/repository/support/PageableExecutionUtils.java index 6045e091b..075ee3efa 100644 --- a/src/main/java/org/springframework/data/repository/support/PageableExecutionUtils.java +++ b/src/main/java/org/springframework/data/repository/support/PageableExecutionUtils.java @@ -42,10 +42,11 @@ public abstract class PageableExecutionUtils { * optimizations. The construction of {@link Page} omits a count query if the total can be determined based on the * result size and {@link Pageable}. * - * @param content must not be {@literal null}. + * @param content result of a query with applied {@link Pageable}. The list must not be {@literal null} and must + * contain up to {@link Pageable#getPageSize()} items. * @param pageable must not be {@literal null}. * @param totalSupplier must not be {@literal null}. - * @return the {@link Page}. + * @return the {@link Page} for {@link List content} and a total size. */ public static Page getPage(List content, Pageable pageable, LongSupplier totalSupplier) { return org.springframework.data.support.PageableExecutionUtils.getPage(content, pageable, totalSupplier); diff --git a/src/main/java/org/springframework/data/support/PageableExecutionUtils.java b/src/main/java/org/springframework/data/support/PageableExecutionUtils.java index 0ca6450bf..2f12ffa38 100644 --- a/src/main/java/org/springframework/data/support/PageableExecutionUtils.java +++ b/src/main/java/org/springframework/data/support/PageableExecutionUtils.java @@ -42,10 +42,11 @@ public abstract class PageableExecutionUtils { * optimizations. The construction of {@link Page} omits a count query if the total can be determined based on the * result size and {@link Pageable}. * - * @param content must not be {@literal null}. + * @param content result of a query with applied {@link Pageable}. The list must not be {@literal null} and must + * contain up to {@link Pageable#getPageSize()} items. * @param pageable must not be {@literal null}. * @param totalSupplier must not be {@literal null}. - * @return the {@link Page}. + * @return the {@link Page} for {@link List content} and a total size. */ public static Page getPage(List content, Pageable pageable, LongSupplier totalSupplier) {