This is an automated email from the ASF dual-hosted git repository. markt-asf pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 966424202acc47c9cd7122755e478a9a8f308a3b Author: Mark Thomas <[email protected]> AuthorDate: Tue Jun 30 15:51:20 2026 +0100 Simplify. Covered by wider sync. --- .../catalina/ha/deploy/FileMessageFactory.java | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java index 68e9596e6f..8fecb7949d 100644 --- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java +++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java @@ -235,17 +235,15 @@ public class FileMessageFactory { lastModified = System.currentTimeMillis(); FileMessage next; - synchronized (this) { - if (!isWriting) { - next = msgBuffer.get(Long.valueOf(lastMessageProcessed.get() + 1)); - if (next != null) { - isWriting = true; - } else { - return false; - } + if (!isWriting) { + next = msgBuffer.get(Long.valueOf(lastMessageProcessed.get() + 1)); + if (next != null) { + isWriting = true; } else { return false; } + } else { + return false; } while (next != null) { @@ -257,11 +255,9 @@ public class FileMessageFactory { cleanup(); return true; } - synchronized (this) { - next = msgBuffer.get(Long.valueOf(lastMessageProcessed.get() + 1)); - if (next == null) { - isWriting = false; - } + next = msgBuffer.get(Long.valueOf(lastMessageProcessed.get() + 1)); + if (next == null) { + isWriting = false; } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
