Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2351

AbstractLogEvent.instant should be exposed for mutation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.11.0, 3.0.0
    • 2.11.1, 3.0.0
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              ckozak Carter Kozak
              ckozak Carter Kozak
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: