Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4B1989A4C for ; Sat, 18 Feb 2012 20:52:22 +0000 (UTC) Received: (qmail 53547 invoked by uid 500); 18 Feb 2012 20:52:20 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 53494 invoked by uid 500); 18 Feb 2012 20:52:20 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 53482 invoked by uid 99); 18 Feb 2012 20:52:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2012 20:52:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2012 20:52:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 96EBD1BF9FC for ; Sat, 18 Feb 2012 20:51:59 +0000 (UTC) Date: Sat, 18 Feb 2012 20:51:59 +0000 (UTC) From: "Uwe Schindler (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <228850491.54882.1329598319619.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <232949137.40593.1329313859557.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3789) Expose FilteredTermsEnum from MTQ 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-3789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211071#comment-13211071 ] Uwe Schindler commented on LUCENE-3789: --------------------------------------- Looks fine. I would make the access method final. > Expose FilteredTermsEnum from MTQ > ---------------------------------- > > Key: LUCENE-3789 > URL: https://issues.apache.org/jira/browse/LUCENE-3789 > Project: Lucene - Java > Issue Type: Improvement > Components: core/search > Affects Versions: 3.6, 4.0 > Reporter: Simon Willnauer > Priority: Minor > Fix For: 3.6, 4.0 > > Attachments: LUCENE-3789.patch > > > MTQ#getEnum() is protected and in order to access it you need to be in the o.a.l.search package. > here is a relevant snipped from the mailing list discussion > {noformat} > getEnum() is protected so it is intended to be called *only* by subclasses (that's the idea behind protected methods). They are also accessible by other classes from the same package, but that's more a Java bug than a feature. The problem with MTQ is that RewriteMethod is a separate *class* and *not a subclass* of MTQ, so the method cannot be called (it can because of the "java bug" called from same package). So theoretically it has to be public otherwise you cannot call getEnum(). > Another cleaner fix would be to add a protected final method to RewriteMethod that calls this method from MTQ. So anything subclassing RewriteMethod can get the enum from inside the RewriteMethod class which is the "correct" way to handle it. Delegating to MTQ is then "internal". > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org