diff options
author | Leif Åstrand <leif@vaadin.com> | 2014-08-26 13:16:11 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2014-08-28 09:38:17 +0300 |
commit | fc5ced8470a4c55b2e9164e3719b50e17e003b53 (patch) | |
tree | 01da57765ecc33ae78f021c42c01a243f46e5e5b | |
parent | aea7ad1b79e2582b888b7238334aab0e49547f45 (diff) | |
download | vaadin-framework-fc5ced8470a4c55b2e9164e3719b50e17e003b53.tar.gz vaadin-framework-fc5ced8470a4c55b2e9164e3719b50e17e003b53.zip |
Ignore files from the classpath for scss cache timestamps (#14506)
Change-Id: I82e3caef915b6a8683608f1834130468b3f16dbf
-rw-r--r-- | server/src/com/vaadin/server/VaadinServlet.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/server/src/com/vaadin/server/VaadinServlet.java b/server/src/com/vaadin/server/VaadinServlet.java index 09b8a22a46..4656f9a672 100644 --- a/server/src/com/vaadin/server/VaadinServlet.java +++ b/server/src/com/vaadin/server/VaadinServlet.java @@ -77,10 +77,20 @@ public class VaadinServlet extends HttpServlet implements Constants { long newest = 0; for (String uri : sourceUris) { File file = new File(uri); - if (!file.exists()) { - return -1; - } else { + if (file.exists()) { newest = Math.max(newest, file.lastModified()); + } else if (!uri.startsWith("VAADIN/")) { + /* + * Ignore missing files starting with VAADIN/ since those + * are fetched from the classpath, report problem and abort + * for other files. + */ + getLogger() + .log(Level.WARNING, + "Could not resolve timestamp for {0}, Scss on the fly caching will be disabled", + uri); + // -1 means this cache entry will never be valid + return -1; } } |