[
https://issues.apache.org/jira/browse/LOG4J2-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646532#comment-16646532
]
Carter Kozak commented on LOG4J2-2475:
--------------------------------------
I don't believe so – we can limit the cleared parameters to the
parametersCount, which should be the number of potentially non-null parameters.
This way we clear all values which may hold references.
This change will require us to invert the order we call swapParameters and
getParameterCount because swapParameters is potentially destructive.
This is what I'm thinking: [https://github.com/apache/logging-log4j2/pull/218]
I would appreciate your feedback!
> Limit reusable event.clear parameter clearing to argsCount
> ----------------------------------------------------------
>
> Key: LOG4J2-2475
> URL: https://issues.apache.org/jira/browse/LOG4J2-2475
> Project: Log4j 2
> Issue Type: Improvement
> Components: Core
> Reporter: Carter Kozak
> Assignee: Carter Kozak
> Priority: Major
>
> Larger parameter arrays may make their way into log4j when passed into the
> logger directly. These may take longer to clear, despite only containing one
> or two parameters.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)