[jira] [Commented] (LOGGING-135) Thread-safety improvements

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (LOGGING-135) Thread-safety improvements

ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/LOGGING-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558204#comment-13558204 ]

Thomas Neidhart commented on LOGGING-135:

I missed that the loggers are serializable, thus the logic in the getLogger() makes sense (no need to re-initialize the transient logger fields in a readObject method, as it will be checked each access to getLogger).


> Thread-safety improvements
> --------------------------
>                 Key: LOGGING-135
>                 URL: https://issues.apache.org/jira/browse/LOGGING-135
>             Project: Commons Logging
>          Issue Type: Bug
>            Reporter: Sebb
> 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