From 758300e27e0110f58794e42bafac6e806ffdfb24 Mon Sep 17 00:00:00 2001 From: Sauli Tähkäpää Date: Thu, 4 Dec 2014 14:36:11 +0200 Subject: Add null check to UI.setTheme. (#15326) Change-Id: I2ab2d24ec05bb618969f59ea15d3a971f88009ca --- server/src/com/vaadin/ui/UI.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server/src/com/vaadin/ui/UI.java') diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index 44948dfb6f..4bd4b67259 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -633,11 +633,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements this.embedId = embedId; // Actual theme - used for finding CustomLayout templates - String unescapedThemeName = request.getParameter("theme"); - if (unescapedThemeName != null) { - // Set theme escapes the name - setTheme(unescapedThemeName); - } + setTheme(request.getParameter("theme")); getPage().init(request); @@ -1168,7 +1164,11 @@ public abstract class UI extends AbstractSingleComponentContainer implements * The new theme name */ public void setTheme(String theme) { - getState().theme = VaadinServlet.stripSpecialChars(theme); + if(theme == null) { + getState().theme = null; + } else { + getState().theme = VaadinServlet.stripSpecialChars(theme); + } } /** -- cgit v1.2.3