Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 63505 invoked from network); 6 Mar 2010 23:03:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Mar 2010 23:03:07 -0000 Received: (qmail 64022 invoked by uid 500); 6 Mar 2010 23:02:48 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 63982 invoked by uid 500); 6 Mar 2010 23:02:48 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 63975 invoked by uid 99); 6 Mar 2010 23:02:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 23:02:48 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 23:02:47 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 87626234C4A9 for ; Sat, 6 Mar 2010 23:02:27 +0000 (UTC) Message-ID: <406593608.120921267916547553.JavaMail.jira@brutus.apache.org> Date: Sat, 6 Mar 2010 23:02:27 +0000 (UTC) From: "Robert Muir (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2277) QueryNodeImpl throws ConcurrentModificationException on add(List) In-Reply-To: <486386273.434321266856828315.JavaMail.jira@brutus.apache.org> 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/LUCENE-2277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842337#action_12842337 ] Robert Muir commented on LUCENE-2277: ------------------------------------- Simon you could also say the bug was adding a List to itself... either way it was wrong. I liked the way Frank describes it because if someone else hit this bug, then they will recognize the exception message in CHANGES. > QueryNodeImpl throws ConcurrentModificationException on add(List) > ---------------------------------------------------------------------------- > > Key: LUCENE-2277 > URL: https://issues.apache.org/jira/browse/LUCENE-2277 > Project: Lucene - Java > Issue Type: Bug > Components: contrib/* > Affects Versions: 3.0 > Environment: all > Reporter: Frank Wesemann > Assignee: Robert Muir > Priority: Critical > Fix For: 3.1 > > Attachments: addChildren.patch, LUCENE-2277.patch > > > on adding a List of children to a QueryNodeImplemention a ConcurrentModificationException is thrown. > This is due to the fact that QueryNodeImpl instead of iteration over the supplied list, iterates over its internal clauses List. > Patch: > Index: QueryNodeImpl.java > =================================================================== > --- QueryNodeImpl.java (revision 911642) > +++ QueryNodeImpl.java (working copy) > @@ -74,7 +74,7 @@ > .getLocalizedMessage(QueryParserMessages.NODE_ACTION_NOT_SUPPORTED)); > } > > - for (QueryNode child : getChildren()) { > + for (QueryNode child : children) { > add(child); > } > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org