]> source.dussan.org Git - vaadin-framework.git/commitdiff
Ignore files from the classpath for scss cache timestamps (#14506)
authorLeif Åstrand <leif@vaadin.com>
Tue, 26 Aug 2014 10:16:11 +0000 (13:16 +0300)
committerLeif Åstrand <leif@vaadin.com>
Thu, 28 Aug 2014 06:38:17 +0000 (09:38 +0300)
Change-Id: I82e3caef915b6a8683608f1834130468b3f16dbf

server/src/com/vaadin/server/VaadinServlet.java

index 09b8a22a46ac6294eb67a37545e43ea5914f26d6..4656f9a67272c2a62338d7de0d8fa392ecdcfeb3 100644 (file)
@@ -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;
                 }
             }