[ 
https://issues.apache.org/jira/browse/LOG4J2-2351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16511030#comment-16511030
 ] 

ASF subversion and git services commented on LOG4J2-2351:
---------------------------------------------------------

Commit 797435b51f21715a47dee63f761605f61d00e43d in logging-log4j2's branch 
refs/heads/release-2.x from [~ckozak]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=797435b ]

[LOG4J2-2351] Added AbstractLogEvent.getMutableInstant

The MutableInstant may be modified by classes extending
AbstractLogEvent.


> AbstractLogEvent.instant should be protected, not private
> ---------------------------------------------------------
>
>                 Key: LOG4J2-2351
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2351
>             Project: Log4j 2
>          Issue Type: Improvement
>    Affects Versions: 2.11.0, 3.0.0
>            Reporter: Carter Kozak
>            Assignee: Carter Kozak
>            Priority: Trivial
>
> Extending AbstractLogEvent there is currently no way to mutate the instant 
> without casting the return value of "getInstant()".
> By making instant protected, classes extending AbstractLogEvent can avoid 
> creating a second Instant implementation in addition to the default.
> Alternatively, we can use a static constant immutable instant, and return 
> that form getInstant by default. This would break any consumers that cast 
> getInstant to a MutableInstant.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to