summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-11-15 13:51:14 +0200
committerVaadin Code Review <review@vaadin.com>2012-11-20 11:40:19 +0000
commita4fbf0a60ca9ec83346d403c569dc7c6db91b87f (patch)
treee475ef1f42d4ce00695611c37240a4c48367b493 /server
parent1384f1eb2c973252da27d6e379d8b863d912b22e (diff)
downloadvaadin-framework-a4fbf0a60ca9ec83346d403c569dc7c6db91b87f.tar.gz
vaadin-framework-a4fbf0a60ca9ec83346d403c569dc7c6db91b87f.zip
Use classloader also to find theme styles.scss (#10107)
Change-Id: I4fb5790dc23e8c5cedfc2113158181abf646245e
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/VaadinServlet.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java
index 2ef9550823..23378e4c20 100644
--- a/server/src/com/vaadin/server/VaadinServlet.java
+++ b/server/src/com/vaadin/server/VaadinServlet.java
@@ -937,6 +937,17 @@ public class VaadinServlet extends HttpServlet implements Constants {
String realFilename = sc.getRealPath(scssFilename);
ScssStylesheet scss = ScssStylesheet.get(realFilename);
if (scss == null) {
+ // Not a file in the file system (WebContent directory). Use the
+ // identifier directly (VAADIN/themes/.../styles.css) so
+ // ScssStylesheet will try using the class loader.
+ if (scssFilename.startsWith("/")) {
+ scssFilename = scssFilename.substring(1);
+ }
+
+ scss = ScssStylesheet.get(scssFilename);
+ }
+
+ if (scss == null) {
getLogger()
.warning(
"Scss file "