On 15/06/2026 20:22, Christopher Schultz wrote:
Mark,

On 6/15/26 1:09 PM, [email protected] wrote:
This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
      new feb8664dc8 Avoid a second re-deploy because the timestamp hasn't been updated
feb8664dc8 is described below

commit feb8664dc8056279ab1e28a936b545c66c969dc1
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Jun 15 18:09:25 2026 +0100

     Avoid a second re-deploy because the timestamp hasn't been updated
---
  java/org/apache/catalina/ha/deploy/WarWatcher.java | 1 +
  1 file changed, 1 insertion(+)

diff --git a/java/org/apache/catalina/ha/deploy/WarWatcher.java b/ java/org/apache/catalina/ha/deploy/WarWatcher.java
index 9e76491e30..2d0d2a0847 100644
--- a/java/org/apache/catalina/ha/deploy/WarWatcher.java
+++ b/java/org/apache/catalina/ha/deploy/WarWatcher.java
@@ -225,6 +225,7 @@ public class WarWatcher {
                  // file was added
                  result = 1;
                  lastState = result;
+                lastModified = war.lastModified();

Should lastModified be marked volatile?

check() is called from backgroundProcess() which should always be called from the same thread so I don't think there is a need for volatile - at least not how Tomcat uses it.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to