Skip to content

Protection from negative result offset#89

Open
meskis wants to merge 1 commit intowhiteoctober:masterfrom
meskis:master
Open

Protection from negative result offset#89
meskis wants to merge 1 commit intowhiteoctober:masterfrom
meskis:master

Conversation

@meskis
Copy link
Copy Markdown

@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
Copy Markdown
Contributor

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

@pablodip
Copy link
Copy Markdown
Contributor

Ping.

@meskis
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Could you add a test case for this, please?

@pablodip
Copy link
Copy Markdown
Contributor

pablodip commented Nov 8, 2013

Ping.

@pablodip
Copy link
Copy Markdown
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.

2 participants