Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 95256 invoked from network); 16 Jun 2009 12:29:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jun 2009 12:29:19 -0000 Received: (qmail 47020 invoked by uid 500); 16 Jun 2009 12:29:30 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 46925 invoked by uid 500); 16 Jun 2009 12:29:29 -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 46917 invoked by uid 99); 16 Jun 2009 12:29:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2009 12:29:29 +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; Tue, 16 Jun 2009 12:29:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B2B69234C044 for ; Tue, 16 Jun 2009 05:29:07 -0700 (PDT) Message-ID: <1803708474.1245155347718.JavaMail.jira@brutus> Date: Tue, 16 Jun 2009 05:29:07 -0700 (PDT) From: "Simon Willnauer (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-1694) Query#mergeBooleanQueries argument should be of type BooleanQuery[] instead of Query[] In-Reply-To: <762780332.1245152107574.JavaMail.jira@brutus> 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 [ https://issues.apache.org/jira/browse/LUCENE-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Willnauer updated LUCENE-1694: ------------------------------------ Attachment: Query_mergeBooleanQueries.patch Attached patch + testcase. The patch passes all tests including test-tag. > Query#mergeBooleanQueries argument should be of type BooleanQuery[] instead of Query[] > -------------------------------------------------------------------------------------- > > Key: LUCENE-1694 > URL: https://issues.apache.org/jira/browse/LUCENE-1694 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Reporter: Simon Willnauer > Priority: Minor > Fix For: 2.9 > > Attachments: Query_mergeBooleanQueries.patch > > > The method #mergeBooleanQueries accepts Query[] and casts elements to BooleanQuery without checking. This will guarantee a ClassCastException if it is not a boolean query. We should enforce this by changing the signature. This won't really break back compat. as it only works with instances of BooleanQuery. -- 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