commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <>
Subject [jira] [Resolved] (LOGGING-135) Thread-safety improvements
Date Wed, 20 Feb 2013 12:33:13 GMT


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:
>             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:

View raw message