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 86813018df Refactor to avoid use of Hashtable. No functional change.
86813018df is described below
commit 86813018df7cffce08228d1f75d5bf7ed66de6bc
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Sep 14 19:44:37 2022 +0100
Refactor to avoid use of Hashtable. No functional change.
---
java/org/apache/catalina/tribes/util/StringManager.java | 5 ++---
java/org/apache/naming/StringManager.java | 6 +++---
java/org/apache/tomcat/util/res/StringManager.java | 5 ++---
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/java/org/apache/catalina/tribes/util/StringManager.java
b/java/org/apache/catalina/tribes/util/StringManager.java
index 0979c469a6..ed689fdb8c 100644
--- a/java/org/apache/catalina/tribes/util/StringManager.java
+++ b/java/org/apache/catalina/tribes/util/StringManager.java
@@ -18,7 +18,7 @@ package org.apache.catalina.tribes.util;
import java.text.MessageFormat;
import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
@@ -180,8 +180,7 @@ public class StringManager {
// STATIC SUPPORT METHODS
// --------------------------------------------------------------
- private static final Map<String, Map<Locale,StringManager>> managers =
- new Hashtable<>();
+ private static final Map<String, Map<Locale,StringManager>> managers = new
HashMap<>();
/**
diff --git a/java/org/apache/naming/StringManager.java
b/java/org/apache/naming/StringManager.java
index 0a4c3699ce..b20094d071 100644
--- a/java/org/apache/naming/StringManager.java
+++ b/java/org/apache/naming/StringManager.java
@@ -17,8 +17,9 @@
package org.apache.naming;
import java.text.MessageFormat;
-import java.util.Hashtable;
+import java.util.HashMap;
import java.util.Locale;
+import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -155,8 +156,7 @@ public class StringManager {
// STATIC SUPPORT METHODS
// --------------------------------------------------------------
- private static final Hashtable<String, StringManager> managers =
- new Hashtable<>();
+ private static final Map<String, StringManager> managers = new HashMap<>();
/**
* Get the StringManager for a particular package. If a manager for
diff --git a/java/org/apache/tomcat/util/res/StringManager.java
b/java/org/apache/tomcat/util/res/StringManager.java
index d9e11bb86e..91b39b48d7 100644
--- a/java/org/apache/tomcat/util/res/StringManager.java
+++ b/java/org/apache/tomcat/util/res/StringManager.java
@@ -18,7 +18,7 @@ package org.apache.tomcat.util.res;
import java.text.MessageFormat;
import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
@@ -187,8 +187,7 @@ public class StringManager {
// STATIC SUPPORT METHODS
// --------------------------------------------------------------
- private static final Map<String, Map<Locale,StringManager>> managers =
- new Hashtable<>();
+ private static final Map<String, Map<Locale,StringManager>> managers = new
HashMap<>();
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]