cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1538379 - /cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
Date Sun, 03 Nov 2013 15:31:04 GMT
Author: aadamchik
Date: Sun Nov  3 15:31:04 2013
New Revision: 1538379

URL: http://svn.apache.org/r1538379
Log:
removing unneeded synchronization.. underlying 'registerNode' is synchronized

Modified:
    cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java

Modified: cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java?rev=1538379&r1=1538378&r2=1538379&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
Sun Nov  3 15:31:04 2013
@@ -335,16 +335,13 @@ public class CayenneContext extends Base
     Persistent createFault(ObjectId id) {
         ClassDescriptor descriptor = getEntityResolver().getClassDescriptor(id.getEntityName());
 
-        Persistent object;
-        synchronized (graphManager) {
-            object = (Persistent) descriptor.createObject();
-
-            object.setPersistenceState(PersistenceState.HOLLOW);
-            object.setObjectContext(this);
-            object.setObjectId(id);
+        Persistent object = (Persistent) descriptor.createObject();
 
-            graphManager.registerNode(id, object);
-        }
+        object.setPersistenceState(PersistenceState.HOLLOW);
+        object.setObjectContext(this);
+        object.setObjectId(id);
+
+        graphManager.registerNode(id, object);
 
         return object;
     }



Mime
View raw message