diff options
author | Henri Sara <henri.sara@itmill.com> | 2012-07-20 14:46:33 +0000 |
---|---|---|
committer | Henri Sara <henri.sara@itmill.com> | 2012-07-20 14:46:33 +0000 |
commit | 482a7362d423a778e71b5e7fc1a7ac346d40c802 (patch) | |
tree | 62bfa0ea6a9bbcbdc8299302056e7c02a53f06b1 /src/com | |
parent | 2738dca83648db5323652b4ac4c53d46eb6001c0 (diff) | |
download | vaadin-framework-482a7362d423a778e71b5e7fc1a7ac346d40c802.tar.gz vaadin-framework-482a7362d423a778e71b5e7fc1a7ac346d40c802.zip |
#8291, #7666 fix Table NegativeArraySizeException when table size reduced by filter or otherwise, related test application
svn changeset:24018/svn branch:6.8
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/vaadin/ui/Table.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java index 55f3f27507..60b6122270 100644 --- a/src/com/vaadin/ui/Table.java +++ b/src/com/vaadin/ui/Table.java @@ -1479,9 +1479,10 @@ public class Table extends AbstractSelect implements Action.Container, // Collects the basic facts about the table page final int pagelen = getPageLength(); - int firstIndex = getCurrentPageFirstItemIndex(); int rows, totalRows; rows = totalRows = size(); + int firstIndex = Math + .min(getCurrentPageFirstItemIndex(), totalRows - 1); if (rows > 0 && firstIndex >= 0) { rows -= firstIndex; } |