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?
Please sign in to leave a comment.
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:
--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com
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...
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.
>
@Override annotation"... I'm not overriding, I'm implementing, so it should
be irrelevant, right? Is this a bug I should post?
I've posted:
http://www.jetbrains.net/jira/browse/IDEA-4759