From 9a5dbba61009caf7d011a1b9d024a9806bdb50c2 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 19 Mar 2012 15:23:47 +0200 Subject: [PATCH] #8455 Root.getCurrentRoot can now be used in Root.init() --- src/com/vaadin/Application.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.39.5