You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/09/15 15:46:18 UTC
[tomcat] branch 8.5.x updated: The Javadoc for getInitParameters() states the returned Map is immutable
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new 427700d310 The Javadoc for getInitParameters() states the returned Map is immutable
427700d310 is described below
commit 427700d310f0f33c401ffd84eedc57a72a2033a2
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Sep 15 16:45:44 2022 +0100
The Javadoc for getInitParameters() states the returned Map is immutable
---
java/javax/servlet/jsp/tagext/TagLibraryValidator.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/java/javax/servlet/jsp/tagext/TagLibraryValidator.java b/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
index 3d5917b15b..067d6caf90 100644
--- a/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
+++ b/java/javax/servlet/jsp/tagext/TagLibraryValidator.java
@@ -16,6 +16,8 @@
*/
package javax.servlet.jsp.tagext;
+import java.util.Collections;
+import java.util.HashMap;
import java.util.Map;
/**
@@ -96,7 +98,7 @@ public abstract class TagLibraryValidator {
* @param map A Map describing the init parameters
*/
public void setInitParameters(Map<String, Object> map) {
- initParameters = map;
+ initParameters = Collections.unmodifiableMap(new HashMap<>(map));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org