From 18d4096bc40fa9a306a1c4ad650c7faf3b5824fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Thu, 6 Sep 2012 13:24:33 +0300 Subject: [PATCH] Remove VaadinSession.isProductionMode() (#9402) --- server/src/com/vaadin/server/BootstrapHandler.java | 5 +++-- server/src/com/vaadin/server/VaadinSession.java | 13 ------------- .../tests/minitutorials/v7a1/FindCurrentUI.java | 4 ++-- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java index 4ebac73b6b..ffd036d66d 100644 --- a/server/src/com/vaadin/server/BootstrapHandler.java +++ b/server/src/com/vaadin/server/BootstrapHandler.java @@ -365,7 +365,8 @@ public abstract class BootstrapHandler implements RequestHandler { JSONObject defaults = getDefaultParameters(context); JSONObject appConfig = getApplicationParameters(context); - boolean isDebug = !context.getApplication().isProductionMode(); + boolean isDebug = !context.getApplication().getConfiguration() + .isProductionMode(); builder.append("vaadin.setDefaults("); appendJsonObject(builder, defaults, isDebug); @@ -450,7 +451,7 @@ public abstract class BootstrapHandler implements RequestHandler { + VaadinServlet.WIDGETSET_DIRECTORY_PATH; defaults.put("widgetsetBase", widgetsetBase); - if (!application.isProductionMode()) { + if (!application.getConfiguration().isProductionMode()) { defaults.put("debug", true); } diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index c95dc9ac22..05b6aed96a 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -886,19 +886,6 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { CurrentInstance.setInheritable(VaadinSession.class, session); } - /** - * Check whether this application is in production mode. If an application - * is in production mode, certain debugging facilities are not available. - * - * @return the status of the production mode flag - * - * @since 7.0 - */ - @Deprecated - public boolean isProductionMode() { - return configuration.isProductionMode(); - } - public void addUIProvider(UIProvider uIProvider) { uiProviders.add(uIProvider); } diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java index 147ea2a919..ef0346b293 100644 --- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java +++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/FindCurrentUI.java @@ -41,8 +41,8 @@ public class FindCurrentUI extends UI { @Override public void buttonClick(ClickEvent event) { String msg = "Running in "; - msg += VaadinSession.getCurrent().isProductionMode() ? "production" - : "debug"; + msg += VaadinSession.getCurrent().getConfiguration() + .isProductionMode() ? "production" : "debug"; Notification.show(msg); } }); -- 2.39.5