From: Artur Signell Date: Mon, 19 Mar 2012 13:23:47 +0000 (+0200) Subject: #8455 Root.getCurrentRoot can now be used in Root.init() X-Git-Tag: 7.0.0.alpha2~280 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9a5dbba61009caf7d011a1b9d024a9806bdb50c2;p=vaadin-framework.git #8455 Root.getCurrentRoot can now be used in Root.init() --- diff --git a/src/com/vaadin/Application.java b/src/com/vaadin/Application.java index fdb7de0454..4d29654fef 100644 --- a/src/com/vaadin/Application.java +++ b/src/com/vaadin/Application.java @@ -2155,6 +2155,9 @@ public class Application implements Terminal.ErrorListener, Serializable { } } + // Set thread local here so it is available in init + Root.setCurrentRoot(root); + if (!initedRoots.contains(rootId)) { boolean initRequiresBrowserDetails = isRootPreserved() || !root.getClass() @@ -2176,7 +2179,6 @@ public class Application implements Terminal.ErrorListener, Serializable { } } // end synchronized block - Root.setCurrentRoot(root); return root; }