You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by st...@apache.org on 2005/07/07 17:22:28 UTC
svn commit: r209610 - in
/incubator/jackrabbit/trunk/core/src/java/org/apache/jackrabbit/core/state:
NodeState.java PropertyState.java
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;