Pageable default value in 5.3.x


I am currently experiencing problems during the migration of hibernate 5.2 to 5.3, regarding pagination.

Indeed, I used a default value, in order to disable this one: @PageableDefault (page = 0, size = Integer.MAX_VALUE) and PageRequest.of (0, Integer.MAX_VALUE) java side when necessary.

But since switching to version 5.3.1, I have the following error on my queries: “max-results can not be negative; nested exception is java.lang.IllegalArgumentException: max-results can not be negative”, and an error 409 is adjourned.

Do you know how to get around the problem?

Send us a test case that replicate the issue: