Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 72768 invoked from network); 6 Nov 2010 13:47:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Nov 2010 13:47:38 -0000 Received: (qmail 32550 invoked by uid 500); 6 Nov 2010 13:48:09 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 32353 invoked by uid 500); 6 Nov 2010 13:48:06 -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 31950 invoked by uid 99); 6 Nov 2010 13:48:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Nov 2010 13:48:05 +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:48:04 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oA6DliuL020607 for ; Sat, 6 Nov 2010 13:47:44 GMT Message-ID: <15330479.51761289051264432.JavaMail.jira@thor> Date: Sat, 6 Nov 2010 09:47:44 -0400 (EDT) From: "Stefan Guggisberg (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Assigned: (JCR-2807) ConcurrentModificationException in SessionItemStateManager.getIdOfRootTransientNodeState() In-Reply-To: <25244844.51601289048744307.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-2807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Guggisberg reassigned JCR-2807: -------------------------------------- Assignee: Stefan Guggisberg > 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 > Assignee: Stefan Guggisberg > > 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.