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 f2110418d1 Refactor to avoid use of Hashtable. No functional change. f2110418d1 is described below commit f2110418d1d37972780364b5b29c35f61506b1bf Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Sep 15 16:34:52 2022 +0100 Refactor to avoid use of Hashtable. No functional change. --- java/org/apache/coyote/ajp/Constants.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/ajp/Constants.java b/java/org/apache/coyote/ajp/Constants.java index 17e57a7fd8..1da971b589 100644 --- a/java/org/apache/coyote/ajp/Constants.java +++ b/java/org/apache/coyote/ajp/Constants.java @@ -16,7 +16,8 @@ */ package org.apache.coyote.ajp; -import java.util.Hashtable; +import java.util.HashMap; +import java.util.Map; /** * Constants. @@ -211,13 +212,13 @@ public final class Constants { return responseTransArray[code]; } - private static final Hashtable<String,Integer> responseTransHash = new Hashtable<>(20); + private static final Map<String,Integer> responseTransMap = new HashMap<>(20); static { try { int i; for (i = 0; i < SC_RESP_AJP13_MAX; i++) { - responseTransHash.put(getResponseHeaderForCode(i), Integer.valueOf(0xA001 + i)); + responseTransMap.put(getResponseHeaderForCode(i), Integer.valueOf(0xA001 + i)); } } catch (Exception e) { @@ -226,7 +227,7 @@ public final class Constants { } public static final int getResponseAjpIndex(String header) { - Integer i = responseTransHash.get(header); + Integer i = responseTransMap.get(header); if (i == null) { return 0; } else { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org