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

ASF GitHub Bot commented on LOG4J2-2351:
----------------------------------------

GitHub user cakofony opened a pull request:

    https://github.com/apache/logging-log4j2/pull/180

    [LOG4J2-2351] AbstractLogEvent.instant is protected, not private

    The MutableInstant may be modified by classes extending
    AbstractLogEvent.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cakofony/logging-log4j2 LOG4J2-2351

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/logging-log4j2/pull/180.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #180
    
----
commit 8dabd5c9fd2970088ca4c18f1e20d815e867c588
Author: Carter Kozak <ckozak@...>
Date:   2018-06-12T14:35:20Z

    [LOG4J2-2351] AbstractLogEvent.instant is protected, not private
    
    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: Major
>
> 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