jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r209610 - in /incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state: NodeState.java PropertyState.java
Date Thu, 07 Jul 2005 15:22:28 GMT
Author: stefan
Date: Thu Jul  7 08:22:26 2005
New Revision: 209610

URL: http://svn.apache.org/viewcvs?rev=209610&view=rev
Log:
fixing potential concurrency issue: NodeState/PropertyState.copy() must be synchronized

Modified:
    incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/NodeState.java
    incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/PropertyState.java

Modified: incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/NodeState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/NodeState.java?rev=209610&r1=209609&r2=209610&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/NodeState.java
(original)
+++ incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/NodeState.java
Thu Jul  7 08:22:26 2005
@@ -105,18 +105,16 @@
     /**
      * {@inheritDoc}
      */
-    protected void copy(ItemState state) {
+    protected synchronized void copy(ItemState state) {
         super.copy(state);
 
         NodeState nodeState = (NodeState) state;
         nodeTypeName = nodeState.getNodeTypeName();
-        mixinTypeNames.clear();
-        mixinTypeNames.addAll(nodeState.getMixinTypeNames());
+        mixinTypeNames = new HashSet(nodeState.getMixinTypeNames());
         defId = nodeState.getDefinitionId();
         uuid = nodeState.getUUID();
-        propertyNames.clear();
-        propertyNames.addAll(nodeState.getPropertyNames());
-        childNodeEntries.removeAll();
+        propertyNames = new HashSet(nodeState.getPropertyNames());
+        childNodeEntries = new ChildNodeEntries();
         childNodeEntries.addAll(nodeState.getChildNodeEntries());
     }
 

Modified: incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/PropertyState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/PropertyState.java?rev=209610&r1=209609&r2=209610&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/PropertyState.java
(original)
+++ incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state/PropertyState.java
Thu Jul  7 08:22:26 2005
@@ -83,7 +83,7 @@
     /**
      * {@inheritDoc}
      */
-    protected void copy(ItemState state) {
+    protected synchronized void copy(ItemState state) {
         super.copy(state);
 
         PropertyState propState = (PropertyState) state;



Mime
View raw message