diff --git a/src/main/java/org/springframework/data/web/PageableArgumentResolver.java b/src/main/java/org/springframework/data/web/PageableArgumentResolver.java index 14b78cd2fc..0904812d4f 100644 --- a/src/main/java/org/springframework/data/web/PageableArgumentResolver.java +++ b/src/main/java/org/springframework/data/web/PageableArgumentResolver.java @@ -28,8 +28,7 @@ /** * Argument resolver to extract a {@link Pageable} object from a {@link NativeWebRequest} for a particular * {@link MethodParameter}. A {@link PageableArgumentResolver} can either resolve {@link Pageable} itself or wrap - * another {@link PageableArgumentResolver} to post-process {@link Pageable}. {@link Pageable} resolution yields either - * in a {@link Pageable} object or {@literal null} if {@link Pageable} cannot be resolved. + * another {@link PageableArgumentResolver} to post-process {@link Pageable}. * * @author Mark Paluch * @since 1.13 diff --git a/src/main/java/org/springframework/data/web/SortArgumentResolver.java b/src/main/java/org/springframework/data/web/SortArgumentResolver.java index acb506f065..75289e496b 100644 --- a/src/main/java/org/springframework/data/web/SortArgumentResolver.java +++ b/src/main/java/org/springframework/data/web/SortArgumentResolver.java @@ -28,8 +28,7 @@ /** * Argument resolver to extract a {@link Sort} object from a {@link NativeWebRequest} for a particular * {@link MethodParameter}. A {@link SortArgumentResolver} can either resolve {@link Sort} itself or wrap another - * {@link SortArgumentResolver} to post-process {@link Sort}. {@link Sort} resolution yields either in a {@link Sort} - * object or {@literal null} if {@link Sort} cannot be resolved. + * {@link SortArgumentResolver} to post-process {@link Sort}. * * @author Mark Paluch * @since 1.13 @@ -45,7 +44,7 @@ public interface SortArgumentResolver extends HandlerMethodArgumentResolver { * @param mavContainer the ModelAndViewContainer for the current request * @param webRequest the current request * @param binderFactory a factory for creating {@link WebDataBinder} instances - * @return the resolved argument value, or {@code null} + * @return the resolved argument value */ @NonNull @Override diff --git a/src/test/java/org/springframework/data/web/PageableHandlerMethodArgumentResolverUnitTests.java b/src/test/java/org/springframework/data/web/PageableHandlerMethodArgumentResolverUnitTests.java index c3bebc46b7..d87644fb79 100755 --- a/src/test/java/org/springframework/data/web/PageableHandlerMethodArgumentResolverUnitTests.java +++ b/src/test/java/org/springframework/data/web/PageableHandlerMethodArgumentResolverUnitTests.java @@ -149,7 +149,7 @@ void sizeParamIsNotNumeric() throws Exception { } @Test // DATACMNS-477 - void returnsNullIfFallbackIsUnpagedAndNoParametersGiven() throws Exception { + void returnsUnpagedIfFallbackIsUnpagedAndNoParametersGiven() throws Exception { var resolver = getResolver(); resolver.setFallbackPageable(Pageable.unpaged()); diff --git a/src/test/java/org/springframework/data/web/ReactivePageableHandlerMethodArgumentResolverUnitTests.java b/src/test/java/org/springframework/data/web/ReactivePageableHandlerMethodArgumentResolverUnitTests.java index 03be31a0c8..9b00ff5efd 100755 --- a/src/test/java/org/springframework/data/web/ReactivePageableHandlerMethodArgumentResolverUnitTests.java +++ b/src/test/java/org/springframework/data/web/ReactivePageableHandlerMethodArgumentResolverUnitTests.java @@ -132,7 +132,7 @@ void sizeParamIsNotNumeric() { } @Test // DATACMNS-1211 - void returnsNullIfFallbackIsUnpagedAndNoParametersGiven() { + void returnsUnpagedIfFallbackIsUnpagedAndNoParametersGiven() { var resolver = getReactiveResolver(); resolver.setFallbackPageable(Pageable.unpaged()); diff --git a/src/test/java/org/springframework/data/web/ReactiveSortHandlerMethodArgumentResolverUnitTests.java b/src/test/java/org/springframework/data/web/ReactiveSortHandlerMethodArgumentResolverUnitTests.java index 381a16d377..7dcac233cb 100755 --- a/src/test/java/org/springframework/data/web/ReactiveSortHandlerMethodArgumentResolverUnitTests.java +++ b/src/test/java/org/springframework/data/web/ReactiveSortHandlerMethodArgumentResolverUnitTests.java @@ -55,7 +55,7 @@ void supportsSortParameter() { } @Test // DATACMNS-1211 - void returnsNullForNoDefault() { + void returnsUnsortedForNoDefault() { assertSupportedAndResolvedTo(getParameterOfMethod("supportedMethod"), Sort.unsorted()); } diff --git a/src/test/java/org/springframework/data/web/SortDefaultUnitTests.java b/src/test/java/org/springframework/data/web/SortDefaultUnitTests.java index b9e5825257..607dbcf814 100755 --- a/src/test/java/org/springframework/data/web/SortDefaultUnitTests.java +++ b/src/test/java/org/springframework/data/web/SortDefaultUnitTests.java @@ -69,7 +69,7 @@ void supportsSortParameter() { } @Test - void returnsNullForNoDefault() throws Exception { + void returnsUnsortedForNoDefault() throws Exception { assertSupportedAndResolvedTo(getParameterOfMethod("supportedMethod"), Sort.unsorted()); } diff --git a/src/test/java/org/springframework/data/web/SortHandlerMethodArgumentResolverUnitTests.java b/src/test/java/org/springframework/data/web/SortHandlerMethodArgumentResolverUnitTests.java index 176ce5c146..73d634ada5 100755 --- a/src/test/java/org/springframework/data/web/SortHandlerMethodArgumentResolverUnitTests.java +++ b/src/test/java/org/springframework/data/web/SortHandlerMethodArgumentResolverUnitTests.java @@ -107,7 +107,7 @@ void discoversQualifiedSortFromRequest() { } @Test - void returnsNullForSortParameterSetToNothing() { + void returnsUnsortedForSortParameterSetToNothing() { var parameter = getParameterOfMethod("supportedMethod");