Skip to content

Instantly share code, notes, and snippets.

119,123c119,120
< ArrayList<Integer> ids=new ArrayList<Integer>(size());
< for(int i=0;i<size();i++) {
< ids.add(i);
< }
< return ids;
---
>
> return new NaturalNumbersList(size());
@HRE
HRE / gist:721663
Created November 30, 2010 13:22
vaadin-lazyquerycontainer issue 5 patch
133c133,134
< return definition.getBatchSize();
---
> // the batch size must not exceed maxCacheSize
> return Math.min(maxCacheSize, definition.getBatchSize());
143c144,146
< if(!itemCache.containsKey(index - addedItemCount)) {
---
> int cacheIndex = index - addedItemCount;
> Integer cacheIndexObject = Integer.valueOf(cacheIndex);