From: Artur Signell Date: Mon, 4 Nov 2013 09:25:50 +0000 (+0200) Subject: Fix NPE caused by setting ApplicationConnection too late (#12736) X-Git-Tag: 7.1.8~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f328340;p=vaadin-framework.git Fix NPE caused by setting ApplicationConnection too late (#12736) Change-Id: Ib5b3bc7123ffd2f212fb6e242ee07175ff743b0f --- diff --git a/client/src/com/vaadin/client/ui/window/WindowConnector.java b/client/src/com/vaadin/client/ui/window/WindowConnector.java index 4b839384a2..ff2e93a3b2 100644 --- a/client/src/com/vaadin/client/ui/window/WindowConnector.java +++ b/client/src/com/vaadin/client/ui/window/WindowConnector.java @@ -99,6 +99,8 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector super.init(); VWindow window = getWidget(); + window.id = getConnectorId(); + window.client = getConnection(); getLayoutManager().registerDependency(this, window.contentPanel.getElement()); @@ -127,9 +129,6 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector VWindow window = getWidget(); String connectorId = getConnectorId(); - window.id = getConnectorId(); - window.client = client; - // Workaround needed for Testing Tools (GWT generates window DOM // slightly different in different browsers). window.closeBox.setId(connectorId + "_window_close");