[
https://issues.apache.org/jira/browse/LOGGING-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Neidhart resolved LOGGING-135.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.1.2
Applied the double-checked locking idiom from Josh Bloch (Item 71) for
Log4JLogger and LogKitLogger (and changing the logger variable to volatile).
This is not working reliably for pre-1.5 java but at least better than before.
We could also make the getLogger() methods synchronized, but this may have a
negative effect on performance in certain environments.
> Thread-safety improvements
> --------------------------
>
> Key: LOGGING-135
> URL: https://issues.apache.org/jira/browse/LOGGING-135
> Project: Commons Logging
> Issue Type: Bug
> Reporter: Sebb
> Fix For: 1.1.2
>
>
> The LogKitLogger.logger field is not final or volatile so changes are not
> guaranteed to be published.
> This includes calls to getLogger(), so two different threads using the same
> instance can theoretically both create the logger.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira