You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/04/01 12:21:45 UTC

svn commit: r1670598 - /tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java

Author: markt
Date: Wed Apr  1 10:21:45 2015
New Revision: 1670598

URL: http://svn.apache.org/r1670598
Log:
Use a constant (that can be re-used by the unit tests) for the file modification resolution.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1670598&r1=1670597&r2=1670598&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Wed Apr  1 10:21:45 2015
@@ -80,6 +80,11 @@ public class HostConfig implements Lifec
      */
     protected static final StringManager sm = StringManager.getManager(HostConfig.class);
 
+    /**
+     * The resolution, in milliseconds, of file modification times.
+     */
+    protected static final long FILE_MODIFICATION_RESOLUTION_MS = 1000;
+
 
     // ----------------------------------------------------- Instance Variables
 
@@ -1223,7 +1228,8 @@ public class HostConfig implements Lifec
         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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org