You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/02/21 18:25:37 UTC

[GitHub] [logging-log4j2] garydgregory commented on a change in pull request #767: [LOG4J2-3410] Fix ClassCastException when key is not a string

garydgregory commented on a change in pull request #767:
URL: https://github.com/apache/logging-log4j2/pull/767#discussion_r811358091



##########
File path: log4j-api/src/main/java/org/apache/logging/log4j/util/SortedArrayStringMap.java
##########
@@ -128,6 +128,21 @@
     private boolean immutable;
     private transient boolean iterating;
 
+    /**
+     * Transforms a generic map to a {@link StringMap} by mapping the keys to
+     * {@link String}.
+     * 
+     * @param map a generic map
+     * @return a {@link StringMap}
+     */
+    public static SortedArrayStringMap fromGenericMap(final Map<?, ?> map) {

Review comment:
       I don't think this is needed, would you check your tests against HEAD, without any main changes?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org