avoiding an OutOfBounds exception
This commit is contained in:
parent
a61b259ca3
commit
d57782444d
|
@ -409,7 +409,9 @@ LOGGER.debug("json: " + jsonArray);
|
|||
@Override
|
||||
public List<AggregationDetails> getRepositoryAggregations(String id, int from, int size) throws JSONException {
|
||||
|
||||
return getRepositoryAggregations(id).subList(from, from + size);
|
||||
List<AggregationDetails> res = getRepositoryAggregations(id);
|
||||
|
||||
return res.subList(from, Math.min(from + size, res.size()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue