Author: violetagg
Date: Sun Dec  7 06:40:38 2014
New Revision: 1643652

URL: http://svn.apache.org/r1643652
Log:
Merged revision(s) 1643651 from tomcat/trunk:
When checking for last modified of a jar file placed in a war file:
- and the URL protocol is jar:file, it is OK to ask for a jar entry:
jar:file:<path-to-war-file>!<path-to-jar-file>
- but when the war file is abstract, the URL point directly to the jar file:
e.g. jar:bundleentry:<path-to-jar-file>!/

Modified:
    tomcat/tc8.0.x/trunk/   (props changed)
    tomcat/tc8.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java

Propchange: tomcat/tc8.0.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec  7 06:40:38 2014
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1643002,1643045,1643054-1643055,1643066,1643121,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643570,1643634,1643649
+/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1643002,1643045,1643054-1643055,1643066,1643121,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643570,1643634,1643649,1643651

Modified: tomcat/tc8.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=1643652&r1=1643651&r2=1643652&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java 
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/jasper/JspCompilationContext.java Sun 
Dec  7 06:40:38 2014
@@ -25,6 +25,7 @@ import java.net.URL;
 import java.net.URLClassLoader;
 import java.net.URLConnection;
 import java.util.Set;
+import java.util.jar.JarEntry;
 
 import javax.servlet.ServletContext;
 import javax.servlet.jsp.tagext.TagInfo;
@@ -363,7 +364,12 @@ public class JspCompilationContext {
                 }
                 uc = jspUrl.openConnection();
                 if (uc instanceof JarURLConnection) {
-                    result = ((JarURLConnection) uc).getJarEntry().getTime();
+                    JarEntry jarEntry = ((JarURLConnection) uc).getJarEntry();
+                    if (jarEntry != null) {
+                        result = jarEntry.getTime();
+                    } else {
+                        result = uc.getLastModified();
+                    }
                 } else {
                     result = uc.getLastModified();
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to