This is an automated email from the ASF dual-hosted git repository.
markt 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 f24f4fc2f1 Be explicit where we have to use ConcurrentHashMap
f24f4fc2f1 is described below
commit f24f4fc2f1364f630984ac994883b6cf74a07a25
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Sep 4 16:03:54 2025 +0100
Be explicit where we have to use ConcurrentHashMap
---
java/org/apache/tomcat/util/http/FastHttpDateFormat.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
index 80e6e572e3..ed49381436 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -75,8 +75,10 @@ public final class FastHttpDateFormat {
/**
* Formatter cache.
+ * <p>
+ * Note: This needs to be a ConcurrentHashMap for correct operation so
declare it as such (rather than as Map).
*/
- private static final Map<Long,String> formatCache = new
ConcurrentHashMap<>(CACHE_SIZE);
+ private static final ConcurrentHashMap<Long,String> formatCache = new
ConcurrentHashMap<>(CACHE_SIZE);
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]