This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 8ea1946d41 Simplify. Covered by wider sync.
8ea1946d41 is described below
commit 8ea1946d41f1e45c40b9943fe533385f7881c341
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 d90811f9d6..85606e67ba 100644
--- a/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
+++ b/java/org/apache/catalina/ha/deploy/FileMessageFactory.java
@@ -245,17 +245,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) {
@@ -267,11 +265,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]