ASF Bugzilla – Attachment 17955 Details for
Bug 33453
Jasper should recompile JSP files whose datestamps change in either direction (not just newer)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Compiler.java diff
Compiler.java.diff (text/plain), 2.35 KB, created by
Jonathan Leech
on 2006-03-23 20:10:54 UTC
(
hide
)
Description:
Compiler.java diff
Filename:
MIME Type:
Creator:
Jonathan Leech
Created:
2006-03-23 20:10:54 UTC
Size:
2.35 KB
patch
obsolete
>--- Compiler.java.original 2005-03-26 14:22:46.000000000 -0700 >+++ Compiler.java 2006-03-23 09:47:23.620185900 -0700 >@@ -26,6 +26,7 @@ > import java.net.URLConnection; > import java.util.Iterator; > import java.util.List; >+import java.util.Map; > > import org.apache.jasper.JasperException; > import org.apache.jasper.JspCompilationContext; >@@ -368,11 +369,14 @@ > return true; > } > >- targetLastModified = targetFile.lastModified(); >- if (checkClass && jsw != null) { >- jsw.setServletClassLastModifiedTime(targetLastModified); >- } >- if (targetLastModified < jspRealLastModified) { >+ if (jsw != null) { >+ targetLastModified = jsw.getLastModified(); >+ } >+ else { >+ return false; >+ } >+ >+ if (targetLastModified != jspRealLastModified) { > if( log.isDebugEnabled() ) { > log.debug("Compiler: outdated: " + targetFile + " " + > targetLastModified ); >@@ -381,16 +385,17 @@ > } > > // determine if source dependent files (e.g. includes using include >- // directives) have been changed. >- if( jsw==null ) { >- return false; >- } >- >+ // directives) have been changed. > List depends = jsw.getDependants(); >+ Map dependToLastModified = jsw.getDependantToLastModified(); > if (depends == null) { > return false; > } >- >+ >+ if (dependToLastModified == null) { >+ return true; >+ } >+ > Iterator it = depends.iterator(); > while (it.hasNext()) { > String include = (String)it.next(); >@@ -403,8 +408,9 @@ > URLConnection includeUconn = includeUrl.openConnection(); > long includeLastModified = includeUconn.getLastModified(); > includeUconn.getInputStream().close(); >- >- if (includeLastModified > targetLastModified) { >+ >+ Long previousLastModified = (Long)dependToLastModified.get(include); >+ if ((previousLastModified == null) || (includeLastModified != previousLastModified.longValue())) { > return true; > } > } catch (Exception e) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 33453
:
16489
|
16492
|
16493
|
16599
| 17955 |
17956
|
17957
|
17958
|
27040