You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2008/01/24 17:18:34 UTC
[jira] Resolved: (JCR-1344) Unsynchronized NameFactoryImpl
initialization
[ https://issues.apache.org/jira/browse/JCR-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Mueller resolved JCR-1344.
---------------------------------
Resolution: Fixed
Committed in revision 614911
> Unsynchronized NameFactoryImpl initialization
> ---------------------------------------------
>
> Key: JCR-1344
> URL: https://issues.apache.org/jira/browse/JCR-1344
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-spi-commons
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Priority: Minor
>
> org.apache.jackrabbit.spi.commons.name.NameFactoryImpl uses an unsafe pattern when initializing:
> private static NameFactory FACTORY;
> private NameFactoryImpl() {};
> public static NameFactory getInstance() {
> if (FACTORY == null) {
> FACTORY = new NameFactoryImpl();
> }
> return FACTORY;
> }
> This is bad in a multi-threaded environment (see http://www.ibm.com/developerworks/library/j-dcl.html for details).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.