Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protection from negative result offset #89

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

Protection from negative result offset #89

wants to merge 1 commit into from

Conversation

meskis
Copy link

@meskis meskis commented May 11, 2013

Issue when getCurrentPage returns 0, offset becomes -10

Issue when getCurrentPage returns 0, offset bocames -10
@pablodip
Copy link
Contributor

When does this happen? Current page should not be less than 1.

@pablodip
Copy link
Contributor

Ping.

@meskis
Copy link
Author

meskis commented Jul 16, 2013

Sorry for delay. As far as I debugged, there is the scenario for exception:
in list page, go to Nth page, then filter to have 0 results and current page becomes 0, as there are 0 results. Then method calculateOffsetForCurrentPageResults subtracts 1 from 0 ant we get negative result causing app to brake.

@pablodip
Copy link
Contributor

Could you add a test case for this, please?

@pablodip
Copy link
Contributor

pablodip commented Nov 8, 2013

Ping.

@pablodip
Copy link
Contributor

pablodip commented Jan 4, 2014

Ping2

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

Successfully merging this pull request may close these issues.

None yet

2 participants