Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 57709 invoked from network); 6 Nov 2010 13:05:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Nov 2010 13:05:40 -0000 Received: (qmail 6026 invoked by uid 500); 6 Nov 2010 13:06:11 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 5900 invoked by uid 500); 6 Nov 2010 13:06:09 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 5893 invoked by uid 99); 6 Nov 2010 13:06:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Nov 2010 13:06:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Nov 2010 13:06:06 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oA6D5ij3020448 for ; Sat, 6 Nov 2010 13:05:44 GMT Message-ID: <25244844.51601289048744307.JavaMail.jira@thor> Date: Sat, 6 Nov 2010 09:05:44 -0400 (EDT) From: "Weston Bustraan (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Created: (JCR-2807) ConcurrentModificationException in SessionItemStateManager.getIdOfRootTransientNodeState() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org ConcurrentModificationException in SessionItemStateManager.getIdOfRootTransientNodeState() ------------------------------------------------------------------------------------------ Key: JCR-2807 URL: https://issues.apache.org/jira/browse/JCR-2807 Project: Jackrabbit Content Repository Issue Type: Bug Affects Versions: 2.1.2 Reporter: Weston Bustraan SessionItemStateManager.getIdOfRootTransientNodeState() is throwing a ConcurrentModificationException on line 607: Here's a snippet of the code: {code} for (NodeId id : candidateIds) { if (nodeId.equals(id) || hierMgr.isAncestor(id, nodeId)) { // already a candidate or a descendant thereof // => skip skip = true; break; } if (hierMgr.isAncestor(nodeId, id)) { // candidate is a descendant => remove candidateIds.remove(id); } } {code} Can't use Collection.remove(Object) in the middle of iterating. It should probably be changed to use Iterator.remove(): {code} Iterator nodeIdItor = candidateIds.iterator(); while (nodeIdItor.hasNext()) { NodeId id = nodeIdItor.next(); if (nodeId.equals(id) || hierMgr.isAncestor(id, nodeId)) { // already a candidate or a descendant thereof // => skip skip = true; break; } if (hierMgr.isAncestor(nodeId, id)) { // candidate is a descendant => remove nodeIdItor.remove(); } } {code} Any idea what I could do differently to workaround the issue? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.