From: Leif Åstrand Date: Thu, 6 Sep 2012 10:24:33 +0000 (+0300) Subject: Remove VaadinSession.isProductionMode() (#9402) X-Git-Tag: 7.0.0.beta1~164 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=18d4096bc40fa9a306a1c4ad650c7faf3b5824fb;p=vaadin-framework.git Remove VaadinSession.isProductionMode() (#9402) --- 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); } });