IDEA 5.0.1 and @Override annotation with abstract methods

Maybe I've misunderstood something, maybe it's a bug. I defined an abstract class, then a concrete class to implement the abstract methods. The editor sidebar shows the (I) symbol next to the method declaration, indicating (correctly) that this is an implementation of an abstract method. There is no intermediate class that implements the abstract method, so this is not the concrete class overriding some other implementation of the method.

Nevertheless, IDEA 5.0.1 is telling me that the method is "missing the @Override annotation"... I'm not overriding, I'm implementing, so it should be irrelevant, right? Is this a bug I should post?

3 comments
Comment actions Permalink

IDEA is following the behaviour of javac. So yes, it's strange, but no,
it's not a bug - at least not a bug of IDEA.

Christopher Brown wrote:

Maybe I've misunderstood something, maybe it's a bug. I defined an abstract class, then a concrete class to implement the abstract methods. The editor sidebar shows the (I) symbol next to the method declaration, indicating (correctly) that this is an implementation of an abstract method. There is no intermediate class that implements the abstract method, so this is not the concrete class overriding some other implementation of the method.

Nevertheless, IDEA 5.0.1 is telling me that the method is "missing the @Override annotation"... I'm not overriding, I'm implementing, so it should be irrelevant, right? Is this a bug I should post?


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

It is legal to @Override only methods from super class (possibly abstract),
but not from super interface.
This was indeed fixed in 5.0.1, in case you experience other behaviour, this
is a bug that you should post.

Eugene.


"Christopher Brown" <no_mail@jetbrains.com> wrote in message
news:14591456.1124882951011.JavaMail.itn@is.intellij.net...

Maybe I've misunderstood something, maybe it's a bug. I defined an

abstract class, then a concrete class to implement the abstract methods.
The editor sidebar shows the (I) symbol next to the method declaration,
indicating (correctly) that this is an implementation of an abstract method.
There is no intermediate class that implements the abstract method, so this
is not the concrete class overriding some other implementation of the
method.
>

Nevertheless, IDEA 5.0.1 is telling me that the method is "missing the

@Override annotation"... I'm not overriding, I'm implementing, so it should
be irrelevant, right? Is this a bug I should post?


0

Please sign in to leave a comment.