[
https://issues.apache.org/jira/browse/BOOKKEEPER-1090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sijie Guo resolved BOOKKEEPER-1090.
-----------------------------------
Resolution: Fixed
This change has been merged in master. Closing this jira now. Thank you
[~mmerli]
> Use LOG.isDebugEnabled() to avoid unexpected allocations
> --------------------------------------------------------
>
> Key: BOOKKEEPER-1090
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-1090
> Project: Bookkeeper
> Issue Type: Improvement
> Reporter: Matteo Merli
> Assignee: Matteo Merli
> Priority: Minor
> Fix For: 4.5.0
>
>
> Using {{LOG.debug(...)}} can lead to multiple unexpected memory allocation,
> even when the logger it's turned off.
> For example, {{int}} and {{long}} parameter are boxed into {{Integer}} and
> {{Long}} objects and the var-arg parameters are using an {{Object[]}} to hold
> them.
> We should guard all usages of {{LOG.debug()}} with the {{if
> (LOG.isDebugEnabled()}} guard.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)