jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r614911 - /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java
Date Thu, 24 Jan 2008 16:16:00 GMT
Author: thomasm
Date: Thu Jan 24 08:15:56 2008
New Revision: 614911

URL: http://svn.apache.org/viewvc?rev=614911&view=rev
Log:
JCR-1344 Unsynchronized NameFactoryImpl initialization

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java?rev=614911&r1=614910&r2=614911&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java
Thu Jan 24 08:15:56 2008
@@ -24,15 +24,12 @@
  */
 public class NameFactoryImpl implements NameFactory {
 
-    private static NameFactory FACTORY;
+    private static final NameFactory INSTANCE = new NameFactoryImpl();
 
     private NameFactoryImpl() {};
 
     public static NameFactory getInstance() {
-        if (FACTORY == null) {
-            FACTORY = new NameFactoryImpl();
-        }
-        return FACTORY;
+        return INSTANCE;
     }
 
     //--------------------------------------------------------< NameFactory >---



Mime
View raw message