This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push: new 5262c3b57e Refactor to avoid use of Hashtable. No functional change. 5262c3b57e is described below commit 5262c3b57e144310927cf078411cc741dcf8aa5c Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Sep 15 15:40:00 2022 +0100 Refactor to avoid use of Hashtable. No functional change. --- java/jakarta/servlet/jsp/tagext/TagSupport.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/java/jakarta/servlet/jsp/tagext/TagSupport.java b/java/jakarta/servlet/jsp/tagext/TagSupport.java index b604bf0594..8cc2fca9e2 100644 --- a/java/jakarta/servlet/jsp/tagext/TagSupport.java +++ b/java/jakarta/servlet/jsp/tagext/TagSupport.java @@ -17,8 +17,10 @@ package jakarta.servlet.jsp.tagext; import java.io.Serializable; +import java.util.Collections; import java.util.Enumeration; -import java.util.Hashtable; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import jakarta.servlet.jsp.JspException; import jakarta.servlet.jsp.PageContext; @@ -227,7 +229,7 @@ public class TagSupport implements IterationTag, Serializable { */ public void setValue(String k, Object o) { if (values == null) { - values = new Hashtable<>(); + values = new ConcurrentHashMap<>(); } values.put(k, o); } @@ -266,7 +268,7 @@ public class TagSupport implements IterationTag, Serializable { if (values == null) { return null; } - return values.keys(); + return Collections.enumeration(values.keySet()); } /** @@ -277,7 +279,7 @@ public class TagSupport implements IterationTag, Serializable { /** * Map of object values keyed by Strings for this tag. */ - private Hashtable<String, Object> values; + private Map<String, Object> values; /** * The value of the id attribute of this tag; or null. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org