[
https://issues.apache.org/jira/browse/LOGGING-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Piotr Karwasz updated LOGGING-196:
----------------------------------
Assignee: Piotr Karwasz
> Disable usage of context classloader by default
> -----------------------------------------------
>
> Key: LOGGING-196
> URL: https://issues.apache.org/jira/browse/LOGGING-196
> Project: Commons Logging
> Issue Type: Bug
> Reporter: Piotr Karwasz
> Assignee: Piotr Karwasz
> Priority: Minor
>
> Commons Logging loads {{Log}} and {{LogFactory}} classes from the context
> classloader by default.
> This is a very dangerous behavior that can lead to memory leaks if the user
> of the {{Log}} is not aware of this behavior:
> * Assigning {{Log}} instances to **static** fields will always lead to
> memory leaks. This is the most popular way to use {{Log}}.
> * Assigning {{Log}} instances to **instance** fields will also lead to
> memory leaks, unless the caller takes extra precautions.
> Therefore we should switch the default value of {{use_tccl} to {{false}} and
> keep the configuration property only for backward compatibility.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)