Author: markt
Date: Wed Apr 1 10:41:17 2015
New Revision: 1670605
URL: http://svn.apache.org/r1670605
Log:
Use a constant (that can be re-used by the unit tests) for the file
modification resolution.
Modified:
tomcat/tc8.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
URL:
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1670605&r1=1670604&r2=1670605&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/startup/HostConfig.java Wed
Apr 1 10:41:17 2015
@@ -77,9 +77,14 @@ public class HostConfig
private static final Log log = LogFactory.getLog( HostConfig.class );
- // ----------------------------------------------------- Instance Variables
+ /**
+ * The resolution, in milliseconds, of file modification times.
+ */
+ protected static final long FILE_MODIFICATION_RESOLUTION_MS = 1000;
+ // ----------------------------------------------------- Instance Variables
+
/**
* The Java class name of the Context implementation we should use.
*/
@@ -1227,7 +1232,8 @@ public class HostConfig
String[] resources =
app.redeployResources.keySet().toArray(new String[0]);
// Offset the current time by the resolution of File.lastModified()
- long currentTimeWithResolutionOffset = System.currentTimeMillis() -
1000;
+ long currentTimeWithResolutionOffset =
+ System.currentTimeMillis() - FILE_MODIFICATION_RESOLUTION_MS;
for (int i = 0; i < resources.length; i++) {
File resource = new File(resources[i]);
if (log.isDebugEnabled())
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]