[
https://issues.apache.org/jira/browse/LOG4J2-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16317192#comment-16317192
]
Mikael Ståldal commented on LOG4J2-2177:
----------------------------------------
I am not sure I like your addition of public constructors with
(Indexed)StringMap to diverse public Message classes [~garydgregory].
(Indexed)StringMap are in the {{org.apache.logging.log4j.util}} package, which
is documented with:
bq. Internal utility classes for the Log4j 2 API. Note that the use of any
classes in this package is not supported. There are no guarantees for binary or
logical compatibility in this package.
It does not seem right to refer to such internal utility classes (or
interfaces) in public method signatures. And how is a user of log4j-api
supposed to create an instance of (Indexed)StringMap?
(This is not about {{IndexedStringMap}} vs. {{StringMap}}.
> Replace use of deprecated Core API
> org.apache.logging.log4j.core.impl.Log4jLogEvent.Builder.setContextMap(Map<String,
> String>)
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: LOG4J2-2177
> URL: https://issues.apache.org/jira/browse/LOG4J2-2177
> Project: Log4j 2
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.10.0
> Reporter: Gary Gregory
> Assignee: Gary Gregory
>
> Replace use of deprecated Core API
> {{org.apache.logging.log4j.core.impl.Log4jLogEvent.Builder.setContextMap(Map<String,
> String>)}}
> In order to implement this cleanly, the internal class
> {{org.apache.logging.log4j.core.impl.ContextDataFactory}} will change its API
> return values from {{StringMap}} to {{IndexedStringMap}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)