@@ -60,14 +60,11 @@ public abstract class PageableHandlerMethodArgumentResolverSupport {
60
60
private boolean oneIndexedParameters = false ;
61
61
62
62
/**
63
- * Configures the {@link Pageable} to be used as fallback in case no {@link PageableDefault} or
64
- * {@link PageableDefault} (the latter only supported in legacy mode) can be found at the method parameter to be
65
- * resolved.
63
+ * Configures the {@link Pageable} to be used as fallback in case no {@link PageableDefault} can be found at the
64
+ * method parameter to be resolved.
66
65
* <p>
67
- * If you set this to {@literal Optional#empty()}, be aware that you controller methods will get {@literal null}
68
- * handed into them in case no {@link Pageable} data can be found in the request. Note, that doing so will require you
69
- * supply bot the page <em>and</em> the size parameter with the requests as there will be no default for any of the
70
- * parameters available.
66
+ * If you set this to {@literal Pageable#unpaged()}, be aware that your controller methods will get an {@code unpaged}
67
+ * instance handed into them in case no {@link Pageable} data can be found in the request.
71
68
*
72
69
* @param fallbackPageable the {@link Pageable} to be used as general fallback.
73
70
*/
@@ -251,7 +248,7 @@ private Pageable getDefaultFromAnnotationOrFallback(MethodParameter methodParame
251
248
252
249
private static Pageable getDefaultPageRequestFrom (MethodParameter parameter , PageableDefault defaults ) {
253
250
254
- Integer defaultPageNumber = defaults .page ();
251
+ int defaultPageNumber = defaults .page ();
255
252
Integer defaultPageSize = getSpecificPropertyOrDefaultFromValue (defaults , "size" );
256
253
257
254
if (defaultPageSize < 1 ) {
0 commit comments