On 27.06.2012 21:13, Kalle Korhonen wrote:
> On Wed, Jun 27, 2012 at 10:41 AM, Howard Lewis Ship <[email protected]> wrote:
>> What's our concensus on using @Override on methods declared by an
>> implemented interface?
>> I'm switching between JDKs & code bases so much my head is spinning.
>> I like @Override in JDK 1.6 mode: present for methods of implemented
>> interfaces.
>> I bet there's a way to get IDEA to annotate existing methods that don't
>> have @Override.
> 
> It comes down to the jdk version we want to support. I like using
> @Override on interface methods as well. Source and binary versions
> don't necessarily need to be the the same but that just adds
> complexity on so many levels. We had an earlier discussion on jdk
> versions but we left it open. My practical opinion is we'd just
> require jdk 1.6 for 5.4 and be done with it. We may need to take a
> vote if can't reach a consensus otherwise.

Really? Switch JDK versions because of @Override? I stated my concerns about 
ditching JDK 1.5
support without need before. I just would not do it if we don't gain any 
significant benefit.

I personally don't like the use of @Override on mere method implementations. 
The naming (and also
the JavaDocs) imply that methods supposed to override superclass methods are to 
be annotated with
it. Overriding is replacing an /existing/ implementation in a superclass or 
parent class with a
different one. With interface implementations or implementations of abstract 
methods there simply is
nothing to be overriden and the annotation would be ambiguous IMO.

Uli


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to