diff options
author | Henri Sara <hesara@vaadin.com> | 2012-09-07 11:07:57 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2012-09-07 11:07:57 +0300 |
commit | c74a3d6d7b7db4eeedcda9c2ae215c89c3b1394e (patch) | |
tree | 8c5b87f20fc7b57e733a1973d320d552ab84049a /server/src/com/vaadin/data/ContainerHelpers.java | |
parent | 78fcee9817e2216eab619f8f750cf6eda7f545d9 (diff) | |
download | vaadin-framework-c74a3d6d7b7db4eeedcda9c2ae215c89c3b1394e.tar.gz vaadin-framework-c74a3d6d7b7db4eeedcda9c2ae215c89c3b1394e.zip |
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.
Diffstat (limited to 'server/src/com/vaadin/data/ContainerHelpers.java')
-rw-r--r-- | server/src/com/vaadin/data/ContainerHelpers.java | 6 |
1 files changed, 1 insertions, 5 deletions
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<Object> rangeOfIds = new ArrayList<Object>(); |