Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 78411 invoked from network); 28 Oct 2009 16:18:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Oct 2009 16:18:22 -0000 Received: (qmail 5271 invoked by uid 500); 28 Oct 2009 16:18:21 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 5191 invoked by uid 500); 28 Oct 2009 16:18:21 -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 5183 invoked by uid 99); 28 Oct 2009 16:18:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2009 16:18:21 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI 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; Wed, 28 Oct 2009 16:18:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6462E234C045 for ; Wed, 28 Oct 2009 09:17:59 -0700 (PDT) Message-ID: <768051698.1256746679406.JavaMail.jira@brutus> Date: Wed, 28 Oct 2009 16:17:59 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2012) Add @Override annotations In-Reply-To: <118720095.1256685419384.JavaMail.jira@brutus> 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-2012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770975#action_12770975 ] Uwe Schindler commented on LUCENE-2012: --------------------------------------- Committed trunk changes in revision: 830661 I will proceed with contrib and test later (not yet). > Add @Override annotations > ------------------------- > > Key: LUCENE-2012 > URL: https://issues.apache.org/jira/browse/LUCENE-2012 > Project: Lucene - Java > Issue Type: Task > Reporter: Uwe Schindler > Fix For: 3.0 > > Attachments: LUCENE-2012.patch > > > During removal of deprecated APIs, mostly the problem was, to not only remove the method in the (abstract) base class (e.g. Scorer.explain()), but also remove it in sub classes that override it. You can easily forget that (especially, if the method was not marked deprecated in the subclass). By adding @Override annotations everywhere in Lucene, such removals are simple, because the compiler throws out an error message in all subclasses which then no longer override the method. > Also it helps preventing the well-known traps like overriding hashcode() instead of hashCode(). > The patch was generated automatically, and is rather large. Should I apply it, or would it break too many patches (but I think, trunk has changed so much, that this is only a minimum of additional work to merge)? -- 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