diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2014-12-04 14:36:11 +0200 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2014-12-04 14:37:33 +0200 |
commit | 758300e27e0110f58794e42bafac6e806ffdfb24 (patch) | |
tree | 17140d34a738a75d150190f9286c6e68543151b4 /server/src | |
parent | e8868a225504dd90dbecaceb1d6eb9df40116355 (diff) | |
download | vaadin-framework-758300e27e0110f58794e42bafac6e806ffdfb24.tar.gz vaadin-framework-758300e27e0110f58794e42bafac6e806ffdfb24.zip |
Add null check to UI.setTheme. (#15326)
Change-Id: I2ab2d24ec05bb618969f59ea15d3a971f88009ca
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/ui/UI.java | 12 |
1 files changed, 6 insertions, 6 deletions
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); + } } /** |