[ 
https://issues.apache.org/jira/browse/LOGGING-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Neidhart resolved LOGGING-146.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.2

Made field volatile and deprecated in r1435122.

With the next major release the use of this field should be changed according 
to sebb's suggestions.
                
> LogFactory.nullClassLoaderFactory is not properly synchronized
> --------------------------------------------------------------
>
>                 Key: LOGGING-146
>                 URL: https://issues.apache.org/jira/browse/LOGGING-146
>             Project: Commons Logging
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>            Reporter: Sebb
>             Fix For: 1.1.2
>
>
> Not all accesses to the protected static mutable field 
> LogFactory.nullClassLoaderFactory are synch. using the same lock.
> This is necessary to ensure safe publication of mutable fields.
> As far as I can tell, the field is only required because a Hashtable cannot 
> hold a null key. So it's not clear why the field is protected rather than 
> private.
> Also, it ought to be possible to replace the field with a dummy key object 
> which can then be used in the Hashtable. That would simplify the code.
> However, any subclasses that relied on the field contents might break.
> If LogFactory is not intended to be part of the public API, then the field 
> could be replaced by the dummy key approach.

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

Reply via email to