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