Project

General

Profile

« Previous | Next » 

Revision 62275

avoiding an OutOfBounds exception

View differences:

RepositoryServiceImpl.java
409 409
    @Override
410 410
    public List<AggregationDetails> getRepositoryAggregations(String id, int from, int size) throws JSONException {
411 411

  
412
        return getRepositoryAggregations(id).subList(from, from + size);
412
	List<AggregationDetails> res = getRepositoryAggregations(id);
413

  
414
	return res.subList(from, Math.min(from + size, res.size()));
413 415
    }
414 416

  
415 417
    @Override

Also available in: Unified diff