jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1034395 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java
Date Fri, 12 Nov 2010 13:25:55 GMT
Author: stefan
Date: Fri Nov 12 13:25:54 2010
New Revision: 1034395

URL: http://svn.apache.org/viewvc?rev=1034395&view=rev
Log:
JCR-2807: ConcurrentModificationException in SessionItemStateManager.getIdOfRootTransientNodeState()

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java?rev=1034395&r1=1034394&r2=1034395&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SessionItemStateManager.java
Fri Nov 12 13:25:54 2010
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.LinkedList;
 import java.util.Map;
@@ -477,7 +478,8 @@ public class SessionItemStateManager
                     }
                     // remove any descendant candidates
                     boolean skip = false;
-                    for (NodeId id : candidateIds) {
+                    for (Iterator<NodeId> it = candidateIds.iterator(); it.hasNext();)
{
+                        NodeId id = it.next();    
                         if (nodeId.equals(id) || hierMgr.isAncestor(id, nodeId)) {
                             // already a candidate or a descendant thereof
                             // => skip
@@ -486,7 +488,7 @@ public class SessionItemStateManager
                         }
                         if (hierMgr.isAncestor(nodeId, id)) {
                             // candidate is a descendant => remove
-                            candidateIds.remove(id);
+                            it.remove();
                         }
                     }
                     if (!skip) {



Mime
View raw message