You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2012/03/12 21:39:06 UTC

svn commit: r1299836 - /geronimo/external/trunk/tomcat-parent-7.0.19/jasper/src/main/java/org/apache/jasper/compiler/Compiler.java

Author: gawor
Date: Mon Mar 12 20:39:06 2012
New Revision: 1299836

URL: http://svn.apache.org/viewvc?rev=1299836&view=rev
Log:
Apply fix for Tomcat bug 52744 and additional fix for jar urls

Modified:
    geronimo/external/trunk/tomcat-parent-7.0.19/jasper/src/main/java/org/apache/jasper/compiler/Compiler.java

Modified: geronimo/external/trunk/tomcat-parent-7.0.19/jasper/src/main/java/org/apache/jasper/compiler/Compiler.java
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/tomcat-parent-7.0.19/jasper/src/main/java/org/apache/jasper/compiler/Compiler.java?rev=1299836&r1=1299835&r2=1299836&view=diff
==============================================================================
--- geronimo/external/trunk/tomcat-parent-7.0.19/jasper/src/main/java/org/apache/jasper/compiler/Compiler.java (original)
+++ geronimo/external/trunk/tomcat-parent-7.0.19/jasper/src/main/java/org/apache/jasper/compiler/Compiler.java Mon Mar 12 20:39:06 2012
@@ -471,7 +471,7 @@ public abstract class Compiler {
         if (checkClass && jsw != null) {
             jsw.setServletClassLastModifiedTime(targetLastModified);
         }
-        if (targetLastModified != jspRealLastModified.longValue()) {
+        if ( (jspRealLastModified.longValue() - targetLastModified) > 1000l ) {
             if (log.isDebugEnabled()) {
                 log.debug("Compiler: outdated: " + targetFile + " "
                         + targetLastModified);
@@ -494,6 +494,17 @@ public abstract class Compiler {
         while (it.hasNext()) {
             Entry<String,Long> include = it.next();
             try {
+                String key = include.getKey();
+                URL includeUrl;
+                if (key.startsWith("jar:")) {
+                    includeUrl = new URL(key);
+                } else {
+                    includeUrl = ctxt.getResource(include.getKey());
+                }
+                if (includeUrl == null) {
+                    return true;
+                }
+
                 URL includeUrl = ctxt.getResource(include.getKey());
                 if (includeUrl == null) {
                     return true;