From 633f4141570f52fc78f4b0b48017c4c246cdf399 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Mon, 3 Sep 2012 15:21:39 +0300 Subject: [PATCH] Don't return initied UI from LegacyApplication.createUIInstance (#9443) --- server/src/com/vaadin/Application.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/server/src/com/vaadin/Application.java b/server/src/com/vaadin/Application.java index 2af3c6a59f..f368257ecd 100644 --- a/server/src/com/vaadin/Application.java +++ b/server/src/com/vaadin/Application.java @@ -235,6 +235,25 @@ public class Application implements Terminal.ErrorListener, Serializable { return mainWindow; } + /** + * This implementation simulates the way of finding a window for a + * request by extracting a window name from the requested path and + * passes that name to {@link #getWindow(String)}. + *

+ * {@inheritDoc} + */ + @Override + public UI getUIForRequest(WrappedRequest request) { + UI uiInstance = getUIInstance(request); + if (uiInstance.getUIId() == -1) { + // Not initialized -> Let go through createUIInstance to make it + // initialized + return null; + } else { + return uiInstance; + } + } + /** * This implementation simulates the way of finding a window for a * request by extracting a window name from the requested path and -- 2.39.5