You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2014/01/06 18:13:52 UTC
[jira] [Resolved] (CONFIGURATION-486)
BeanHelper.setDefaultBeanFactory() is thread-hostile and not thread-safe
[ https://issues.apache.org/jira/browse/CONFIGURATION-486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Heger resolved CONFIGURATION-486.
----------------------------------------
Resolution: Fixed
All points mentioned in this ticket have now been addressed.
Default values are no longer set using static member fields; alternatives have been created.
> BeanHelper.setDefaultBeanFactory() is thread-hostile and not thread-safe
> ------------------------------------------------------------------------
>
> Key: CONFIGURATION-486
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-486
> Project: Commons Configuration
> Issue Type: Bug
> Reporter: Sebb
> Fix For: 2.0
>
>
> BeanHelper.setDefaultBeanFactory() sets a private static field.
> This is thread-hostile, because different threads cannot safely use different factories.
> It's also not thread-safe, as the variable is not guaranteed to be published safely.
> Should either make the variable volatile, or synchronize both getter and setter.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)