lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: [jira] Commented: (LUCENE-2012) Add @Override annotations
Date Thu, 29 Oct 2009 14:17:59 GMT
You vulgar Germans :) Think of the poor, naive American children.

Uwe Schindler (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/LUCENE-2012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771428#action_12771428
] 
>
> Uwe Schindler commented on LUCENE-2012:
> ---------------------------------------
>
> No problem :) But then it should also have stopped at generics :-]
>
>   
>> 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)?
>>     
>
>   


-- 
- Mark

http://www.lucidimagination.com




---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message