Skip to content

Commit

Permalink
BZ-1074322 - REST /task/query parameter pageSize=10 returns all the t…
Browse files Browse the repository at this point in the history
…asks

(cherry picked from commit 9a3c8de)
  • Loading branch information
Marco Rietveld committed Mar 20, 2014
1 parent 436600e commit 8de5aa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -397,7 +397,7 @@ protected static List<Status> convertStringListToStatusList( List<String> status
p = 0;
}

int s = 10;
int s = 0;
Number pageSize = getNumberParam(SIZE_LONG_PARAM, false, params, oper, false);
if( pageSize != null ) {
s = pageSize.intValue();
Expand Down
Expand Up @@ -13,7 +13,6 @@ public class PaginatorTest extends ResourceBase {

@Test
public void testPaginate() {

List<Integer> results = new ArrayList<Integer>();
for( int i = 0; i < 100; ++i ) {
results.add(i);
Expand Down Expand Up @@ -52,6 +51,7 @@ public void testPaginate() {
assertEquals( 5, pagedList.size() );

pageInfo[PAGE_NUM] = 0;
pageInfo[PAGE_SIZE] = 0;
pagedList = paginate(pageInfo, results);
assertEquals( pagedList.size(), results.size());
}
Expand Down

0 comments on commit 8de5aa5

Please sign in to comment.