From 5708366ebf49e1c5c800b4684a735d1cd1868772 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Tue, 22 Nov 2016 14:14:43 +0200 Subject: Add UI.access() safeguard for shared data providers Change-Id: I1d2b0f4299cee944b39cda5fd26612b560e8c4e7 --- server/src/main/java/com/vaadin/server/data/DataCommunicator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 extends AbstractExtension { private void attachDataProviderListener() { dataProviderUpdateRegistration = getDataProvider() - .addDataProviderListener(event -> reset()); + .addDataProviderListener( + event -> getUI().access(() -> reset())); } private void detachDataProviderListener() { -- cgit v1.2.3