This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 336fd8bc14 Refactor to avoid use of Hashtable. No functional change.
336fd8bc14 is described below
commit 336fd8bc14373223e159578b1fb82550ce5816ce
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Sep 15 15:48:18 2022 +0100
Refactor to avoid use of Hashtable. No functional change.
---
java/org/apache/catalina/valves/rewrite/RewriteValve.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java
b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
index e1589f801a..2cfac3d878 100644
--- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java
+++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
@@ -24,10 +24,10 @@ import java.io.StringReader;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
-import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
+import java.util.concurrent.ConcurrentHashMap;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.Cookie;
@@ -102,7 +102,7 @@ public class RewriteValve extends ValveBase {
/**
* Maps to be used by the rules.
*/
- protected Map<String, RewriteMap> maps = new Hashtable<>();
+ protected Map<String, RewriteMap> maps = new ConcurrentHashMap<>();
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]