Author: funkman Date: Wed Dec 26 17:57:02 2007 New Revision: 606994 URL: http://svn.apache.org/viewvc?rev=606994&view=rev Log: http://issues.apache.org/bugzilla/show_bug.cgi?id=42503 ServletContext.getResourceAsStream returns stale data
patch by Arvind Srinivasan arvindDOTsrinivasan sun com Modified: tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java Modified: tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java?rev=606994&r1=606993&r2=606994&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java (original) +++ tomcat/trunk/java/org/apache/naming/resources/FileDirContext.java Wed Dec 26 17:57:02 2007 @@ -986,6 +986,8 @@ public FileResourceAttributes(File file) { this.file = file; + getCreation(); + getLastModified(); } // --------------------------------------------------- Member Variables @@ -1036,7 +1038,7 @@ public long getCreation() { if (creation != -1L) return creation; - creation = file.lastModified(); + creation = getLastModified(); return creation; } @@ -1048,7 +1050,7 @@ */ public Date getCreationDate() { if (creation == -1L) { - creation = file.lastModified(); + creation = getCreation(); } return super.getCreationDate(); } @@ -1074,7 +1076,7 @@ */ public Date getLastModifiedDate() { if (lastModified == -1L) { - lastModified = file.lastModified(); + lastModified = getLastModified(); } return super.getLastModifiedDate(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]