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

AbstractLogEvent.instant should be exposed for mutation

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.11.0, 3.0.0
    • Fix Version/s: 3.0.0, 2.11.1
    • Component/s: None
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: