commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (Commented) (JIRA)" <>
Subject [jira] [Commented] (CONFIGURATION-486) BeanHelper.setDefaultBeanFactory() is thread-hostile and not thread-safe
Date Sat, 17 Mar 2012 17:23:37 GMT


Sebb commented on CONFIGURATION-486:

Fixing the thread-safety issue is trivial.

However, the class will still be potentially thread-hostile, depending on when the setter
and getter are used.

Fixing that might require a redesign of the code.
> BeanHelper.setDefaultBeanFactory() is thread-hostile and not thread-safe
> ------------------------------------------------------------------------
>                 Key: CONFIGURATION-486
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Bug
>            Reporter: Sebb
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message