aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorHenrik Paul <henrik@vaadin.com>2013-12-07 01:56:10 +0200
committerHenrik Paul <henrik@vaadin.com>2013-12-07 01:56:10 +0200
commit78ae8b87003c65eff28c97eef4ab46bdc7aef2f5 (patch)
tree9deb61ca465906da90c84f20581355a56a11b10a /client
parente5e6f4386cdfee43ec3c24ba8edba620ae2dbf20 (diff)
downloadvaadin-framework-78ae8b87003c65eff28c97eef4ab46bdc7aef2f5.tar.gz
vaadin-framework-78ae8b87003c65eff28c97eef4ab46bdc7aef2f5.zip
Fixes a cache range error (#12645)
Change-Id: I1b1a76978ae39ce93aadcf4859d9eb1d55605694
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/data/AbstractRemoteDataSource.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/data/AbstractRemoteDataSource.java b/client/src/com/vaadin/client/data/AbstractRemoteDataSource.java
index bda923ef6f..ff8847ea44 100644
--- a/client/src/com/vaadin/client/data/AbstractRemoteDataSource.java
+++ b/client/src/com/vaadin/client/data/AbstractRemoteDataSource.java
@@ -210,7 +210,16 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
cached = newUsefulData;
} else {
discardStaleCacheEntries();
- cached = cached.combineWith(newUsefulData);
+
+ /*
+ * everything might've become stale so we need to re-check for
+ * emptiness.
+ */
+ if (!cached.isEmpty()) {
+ cached = cached.combineWith(newUsefulData);
+ } else {
+ cached = newUsefulData;
+ }
}
}