and I only get 9 results back. As far as I understand the reason is in PageableHandlerMethodArgumentResolver:240 and there we see the following:
int page = StringUtils.hasText(pageString) ? parseAndApplyBoundaries(pageString, Integer.MAX_VALUE)
: defaultOrFallback.getPageNumber();
int pageSize = StringUtils.hasText(pageSizeString) ? parseAndApplyBoundaries(pageSizeString, maxPageSize)
: defaultOrFallback.getPageSize();
The same method parseAndApplyBoundaries is called for both page and size parameters. And in this method there is a check if I'm using oneIndexedParameters which is yes in my case. Then it will substract -1 because I'm using oneIndexedParameters:
int parsed = Integer.parseInt(parameter) - (oneIndexedParameters ? 1 : 0);
Petar Tahchiev opened DATAREST-698 and commented
I'm calling this url:
and I only get 9 results back. As far as I understand the reason is in
PageableHandlerMethodArgumentResolver:240
and there we see the following:The same method
parseAndApplyBoundaries
is called for bothpage
andsize
parameters. And in this method there is a check if I'm usingoneIndexedParameters
which is yes in my case. Then it will substract -1 because I'm usingoneIndexedParameters
:so now it becomes 9.
Affects: 2.4 GA (Gosling)
Backported to: 2.4.1 (Gosling SR1)
The text was updated successfully, but these errors were encountered: