summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/Table.java
diff options
context:
space:
mode:
authorJuuso Valli <juuso@vaadin.com>2014-05-26 17:22:18 +0300
committerVaadin Code Review <review@vaadin.com>2014-05-27 07:29:30 +0000
commit930fd30a937ef69ba45e501bdee78773bad5523f (patch)
treec7e3e054d49715f27bf2c9c50b2d71d830cff2b4 /server/src/com/vaadin/ui/Table.java
parent09c9de6e2a94553a324234157c7c9254011bef01 (diff)
downloadvaadin-framework-930fd30a937ef69ba45e501bdee78773bad5523f.tar.gz
vaadin-framework-930fd30a937ef69ba45e501bdee78773bad5523f.zip
Fix Push update race condition (#13562)
Change-Id: I50094bc2d236f6dbb02a8b82d6cc9b5f7e4733a5
Diffstat (limited to 'server/src/com/vaadin/ui/Table.java')
-rw-r--r--server/src/com/vaadin/ui/Table.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java
index b4d79f304c..a8265662ea 100644
--- a/server/src/com/vaadin/ui/Table.java
+++ b/server/src/com/vaadin/ui/Table.java
@@ -2957,12 +2957,19 @@ public class Table extends AbstractSelect implements Action.Container,
if (value != null) {
reqFirstRowToPaint = value.intValue();
}
+
value = (Integer) variables.get("reqrows");
if (value != null) {
reqRowsToPaint = value.intValue();
+ int size = size();
// sanity check
- if (reqFirstRowToPaint + reqRowsToPaint > size()) {
- reqRowsToPaint = size() - reqFirstRowToPaint;
+
+ if (reqFirstRowToPaint >= size) {
+ reqFirstRowToPaint = size;
+ }
+
+ if (reqFirstRowToPaint + reqRowsToPaint > size) {
+ reqRowsToPaint = size - reqFirstRowToPaint;
}
}
}