diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-11-22 14:14:43 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-11-22 16:12:52 +0200 |
commit | 5708366ebf49e1c5c800b4684a735d1cd1868772 (patch) | |
tree | a0c95c083b8aaa3683c3281d31a41f1e4a5d2e56 | |
parent | 38a14a9621057a6016eada7271d8f3acdd4eb77d (diff) | |
download | vaadin-framework-5708366ebf49e1c5c800b4684a735d1cd1868772.tar.gz vaadin-framework-5708366ebf49e1c5c800b4684a735d1cd1868772.zip |
Add UI.access() safeguard for shared data providers
Change-Id: I1d2b0f4299cee944b39cda5fd26612b560e8c4e7
-rw-r--r-- | server/src/main/java/com/vaadin/server/data/DataCommunicator.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/server/data/DataCommunicator.java b/server/src/main/java/com/vaadin/server/data/DataCommunicator.java index 852c583a56..4709230d82 100644 --- a/server/src/main/java/com/vaadin/server/data/DataCommunicator.java +++ b/server/src/main/java/com/vaadin/server/data/DataCommunicator.java @@ -481,7 +481,8 @@ public class DataCommunicator<T> extends AbstractExtension { private void attachDataProviderListener() { dataProviderUpdateRegistration = getDataProvider() - .addDataProviderListener(event -> reset()); + .addDataProviderListener( + event -> getUI().access(() -> reset())); } private void detachDataProviderListener() { |