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 1361ae0da6 Refactor to avoid use of Hashtable. No functional change.
1361ae0da6 is described below
commit 1361ae0da6d6f87353a221c2930a2458c956ac01
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 53f8fc8fb6..29929843af 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 javax.servlet.ServletException;
import javax.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]