This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
     new cb71338569 Be explicit where we have to use ConcurrentHashMap
cb71338569 is described below

commit cb7133856936ef2b0bb211fc3ca4b330372e8824
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 6875d8282f..3cacd0b9e7 100644
--- a/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
+++ b/java/org/apache/tomcat/util/http/FastHttpDateFormat.java
@@ -84,8 +84,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]

Reply via email to