Skip to content

Commit

Permalink
Fix paged list to use hasNextPage() for hasNext()
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghaolu committed Apr 15, 2016
1 parent 4ff082d commit ea61512
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public ListItr(int index) {

@Override
public boolean hasNext() {
return itemsListItr.hasNext() || nextPageLink != null;
return itemsListItr.hasNext() || hasNextPage();
}

@Override
Expand Down Expand Up @@ -191,7 +191,7 @@ public int size() {

@Override
public boolean isEmpty() {
return items.isEmpty() && nextPageLink == null;
return items.isEmpty() && !hasNextPage();
}

@Override
Expand Down

0 comments on commit ea61512

Please sign in to comment.