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:45:51 UTC
[tomcat] branch main 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 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 b0b56e9814 The Javadoc for getInitParameters() states the returned Map is immutable
b0b56e9814 is described below
commit b0b56e981489465404857be104dd5b38c8b266b7
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/jakarta/servlet/jsp/tagext/TagLibraryValidator.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java b/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java
index e45361405f..58d27581c7 100644
--- a/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java
+++ b/java/jakarta/servlet/jsp/tagext/TagLibraryValidator.java
@@ -16,6 +16,8 @@
*/
package jakarta.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