From 20162dbe200111a514ab0849963dcf3eea1a9c83 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Mon, 8 Jul 2013 17:23:49 +0300 Subject: Set current instances when calling UI.push from VaadinSession.unlock (#12168) Change-Id: I27795ab9ae3e3692f508e847936ccaa5a1ebadd4 --- server/src/com/vaadin/ui/UI.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'server/src/com/vaadin/ui/UI.java') diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index 6c9551ea81..403bb31f63 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -1294,15 +1294,18 @@ public abstract class UI extends AbstractSingleComponentContainer implements * Pushes the pending changes and client RPC invocations of this UI to the * client-side. *

- * As with all UI methods, it is not safe to call push() without holding the - * {@link VaadinSession#lock() session lock}. + * As with all UI methods, the session must be locked when calling this + * method. It is also recommended that {@link UI#getCurrent()} is set up to + * return this UI since writing the response may invoke logic in any + * attached component or extension. The recommended way of fulfilling these + * conditions is to use {@link #access(Runnable)}. * * @throws IllegalStateException * if push is disabled. * @throws UIDetachedException * if this UI is not attached to a session. * - * @see #getPushMode() + * @see #getPushConfiguration() * * @since 7.1 */ -- cgit v1.2.3