fix out of bound exception
This commit is contained in:
parent
a8e565ec07
commit
824c552738
1 changed files with 5 additions and 1 deletions
|
@ -147,7 +147,11 @@ public class CachedClientImpl extends Client {
|
|||
}
|
||||
});
|
||||
}
|
||||
return Single.just(new Cursor<>(items, Optional.of(String.valueOf(items.get(items.size() - 1).id()))));
|
||||
Optional<String> next = Optional.empty();
|
||||
if(items.size() != 0) {
|
||||
next = Optional.of(String.valueOf(items.get(items.size() - 1).id()));
|
||||
}
|
||||
return Single.just(new Cursor<>(items, next));
|
||||
}
|
||||
return this.client.getObjects(rect, cont).doOnSuccess(cursor -> {
|
||||
for (var item : cursor.items()) {
|
||||
|
|
Loading…
Reference in a new issue