From c74a3d6d7b7db4eeedcda9c2ae215c89c3b1394e Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Fri, 7 Sep 2012 11:07:57 +0300 Subject: Return short list instead of exception if less items available (#8028) Container.Indexed.getItemIds(int, int) does not throw an exception if too few items are available in the container. --- server/src/com/vaadin/data/ContainerHelpers.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'server/src/com/vaadin/data/ContainerHelpers.java') diff --git a/server/src/com/vaadin/data/ContainerHelpers.java b/server/src/com/vaadin/data/ContainerHelpers.java index 9ec2da4362..866fe97141 100644 --- a/server/src/com/vaadin/data/ContainerHelpers.java +++ b/server/src/com/vaadin/data/ContainerHelpers.java @@ -64,11 +64,7 @@ public class ContainerHelpers { int endIndex = startIndex + numberOfIds; if (endIndex > container.size()) { - throw new RangeOutOfContainerBoundsException( - "Cannot get all requested item ids from container. " - + "Container size might have changed, recalculate numberOfIds " - + "based on the actual container size!", - startIndex, numberOfIds, container.size()); + endIndex = container.size(); } ArrayList rangeOfIds = new ArrayList(); -- cgit v1.2.3