Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 64082 invoked from network); 5 Apr 2007 22:20:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Apr 2007 22:20:43 -0000 Received: (qmail 76698 invoked by uid 500); 5 Apr 2007 22:20:47 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 76672 invoked by uid 500); 5 Apr 2007 22:20:47 -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 76661 invoked by uid 99); 5 Apr 2007 22:20:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2007 15:20:47 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mike.klaas@gmail.com designates 64.233.184.225 as permitted sender) Received: from [64.233.184.225] (HELO wr-out-0506.google.com) (64.233.184.225) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2007 15:20:39 -0700 Received: by wr-out-0506.google.com with SMTP id 69so469486wra for ; Thu, 05 Apr 2007 15:20:19 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lYWLo+VuW0fGW4O2OTw1t1vD6dZGzfy+IDOBxbZMDjPDh4q+KBrLjIQU2tXyHIcBIpf3/bOzcVIdc3Kl7kA/Ud9iaJhYSVMdaqP5NByI6FRkS8aQ0xC3GSXSdTkKYeyV7/5aXuJ2e2kHmJelL0LOxMzxm9zlJpBlKDPXNK7Ub6Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ffVGXroj4k2SDkweOltHR2gGNopluZzcgRGEpvLkyWGvBf3VVPZJdHkDHJxW4aBladAv1ZkwAO36QFaTSoO0DOJWryeDM+8MR3WfLvlPYH27trM28px5AkufQYd4Xtmnvc0mrCGfz0Fyf4iG/4V13z+k4Yty7YzbnFH/iOq1kKo= Received: by 10.114.197.1 with SMTP id u1mr942190waf.1175811618826; Thu, 05 Apr 2007 15:20:18 -0700 (PDT) Received: by 10.114.196.6 with HTTP; Thu, 5 Apr 2007 15:20:18 -0700 (PDT) Message-ID: <3d2ce8cb0704051520m5f133eb3pfa3b55c46151602f@mail.gmail.com> Date: Thu, 5 Apr 2007 15:20:18 -0700 From: "Mike Klaas" To: java-dev@lucene.apache.org Subject: Re: [jira] Resolved: (LUCENE-796) Change Visibility of fields[] in MultiFieldQueryParser In-Reply-To: <24781513.1175738912562.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <11531223.1170759965935.JavaMail.jira@brutus> <24781513.1175738912562.JavaMail.jira@brutus> X-Virus-Checked: Checked by ClamAV on apache.org On 4/4/07, Otis Gospodnetic (JIRA) wrote: > > [ https://issues.apache.org/jira/browse/LUCENE-796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] > > Otis Gospodnetic resolved LUCENE-796. > ------------------------------------- > > Resolution: Fixed > > Makes sense. Thanks Steve, applied. I left those 2 private attributes of MFQP as private until somebody asks for them to be protected. I'm not sure if this applies to this issue, but ISTM that a "private unless you bug the devs" approach to variable scoping is a little odd. A few unecessary "private"s sprinkled through the code can really wreck havoc on effects to extend functionality cleanly. This has caused me grief in the past, and waiting for a lucene release isn't usually a good solution--c&p is faster. What if maintaining backward-compatibility of the "inheritance interface" of classes was explicitly not guaranteed--would this allow the default policy for new code to use protected rather than private (unless there is a reason for the latter)? A class is either designed for extensibility in mind (or certain kinds), or not at all. It is perhaps unrealistic to audit all lucene classes, but perhaps a whole class could be opened up when a bug report is filed? FWIW: $ find -name \*.java | xargs grep private | wc 914 $ find -name \*.java | xargs grep protected | wc 260 cheers, -Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org