larryi 01/01/14 12:55:27
Modified: src/share/org/apache/tomcat/modules/mappers
ReloadInterceptor.java
src/share/org/apache/tomcat/util/depend
DependClassLoader.java
Log:
Update ReloadInterceptor to initialize the web.xml dependency using the
file's lastModified() time instead of the current time. On Win9x, times round
up to the next second. If we just expanded a war file, then web.xml's
lastModifed() time may exceed the current time.
Simplified DependClassLoader to do the same.
Revision Changes Path
1.2 +1 -2
jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/ReloadInterceptor.java
Index: ReloadInterceptor.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/ReloadInterceptor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ReloadInterceptor.java 2001/01/01 02:01:30 1.1
+++ ReloadInterceptor.java 2001/01/14 20:55:27 1.2
@@ -108,8 +108,7 @@
Dependency dep=new Dependency();
dep.setTarget("web.xml");
dep.setOrigin( inf_xml );
- // if change after now, we'll reload the context
- dep.setLastModified( System.currentTimeMillis() );
+ dep.setLastModified( inf_xml.lastModified() );
dm.addDependency( dep );
}
}
1.3 +1 -6
jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependClassLoader.java
Index: DependClassLoader.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependClassLoader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DependClassLoader.java 2000/12/04 00:35:38 1.2
+++ DependClassLoader.java 2001/01/14 20:55:27 1.3
@@ -172,12 +172,7 @@
if( f==null ) return;
Dependency dep=new Dependency();
- long lm = f.lastModified();
- long ct = System.currentTimeMillis();
- // if we just loaded a newly created class file, os dependent rounding
- // of lastModified() may cause it to exceed currentTimeMillis()
- if ( ct < lm ) ct = lm;
- dep.setLastModified( ct );
+ dep.setLastModified( f.lastModified() );
dep.setTarget( c );
dep.setOrigin( f );
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]