cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r486152 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
Date Tue, 12 Dec 2006 14:09:02 GMT
Author: aadamchik
Date: Tue Dec 12 06:09:01 2006
New Revision: 486152

URL: http://svn.apache.org/viewvc?view=rev&rev=486152
Log:
missing synchronization of the Graphmanager methods ... can result in race conditions

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java?view=diff&rev=486152&r1=486151&r2=486152
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
Tue Dec 12 06:09:01 2006
@@ -747,7 +747,7 @@
                         changes.remove(nodeId);
                         registerNode(nodeId, object);
                         nodeCreated(nodeId);
-                        if(dataObject != null) {
+                        if (dataObject != null) {
                             delegate.finishedProcessDelete(dataObject);
                         }
                     }
@@ -973,14 +973,14 @@
     /**
      * @since 1.2
      */
-    public void registerNode(Object nodeId, Object nodeObject) {
+    public synchronized void registerNode(Object nodeId, Object nodeObject) {
         objectMap.put(nodeId, nodeObject);
     }
 
     /**
      * @since 1.2
      */
-    public Object unregisterNode(Object nodeId) {
+    public synchronized Object unregisterNode(Object nodeId) {
         Object object = getNode(nodeId);
         if (object != null) {
             objectsUnregistered(Collections.singleton(object));



Mime
View raw message