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

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


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

commit 813af12fa30c2e8a6f0b231a48335847906a7e39
Author: Mark Thomas <ma...@apache.org>
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to