Skip to content

Protection from negative result offset#89

Open
meskis wants to merge 1 commit into
whiteoctober:masterfrom
meskis:master
Open

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

Conversation

@meskis

@meskis meskis commented May 11, 2013

Copy link
Copy Markdown

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

meskis commented Jul 16, 2013

Copy link
Copy Markdown
Author

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

pablodip commented Nov 8, 2013

Copy link
Copy Markdown
Contributor

Ping.

@pablodip

pablodip commented Jan 4, 2014

Copy link
Copy Markdown
Contributor

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