Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

[ALF-22050] CQ: Allow to recover empty pagings #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tartard
Copy link

@tartard tartard commented Dec 12, 2018

Requesting a paging wich does not exist should return either null, either an empty paging which can give the information on the absence of results.
Currently, the only way to know the number of results in a PagingResult is to call PagingResults#getPage() .
The problem is that this method throws an exception if the paging has no results when asking an out-of-bound page (for example asking for page two with 10 items in a query which has only 9 results).

Even if most of the time the developer has control over the paging of his request, it is not fundamentally wrong to ask for a not existing paging. It is like making a query which has no results, and in this case no exception is raised.

@derekhulley derekhulley changed the title [ALF-22050] Allow to recover empty pagings. [ALF-22050] CQ: Allow to recover empty pagings Dec 13, 2018
@killerboot
Copy link
Contributor

@tartard Thanks for the fix.
Could you please rebase against latest master, it has Travis config. So that we can see the test results here.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@tartard
Copy link
Author

tartard commented Oct 21, 2020

@killerboot , sorry I didn't notice your comment almost 2 years ago... I just updated my PR by rebasing against the latest master. I hope it is still ok.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants