Comment 2 for bug 364770

Olivier Bilodeau (plaxx) wrote :

Michael, I tried the settings you send me and I still got a lot of compiler complains for the @override statements. Reading about it, I found out that the behavior between java 5 and java 6 changed. For Java 5 @override was generating a compiler error when the method had no matching superclass method (overriding a superclass method). In Java 6, the behaviour changed, @override on a method will generate a compiler error if there are no superclass methods (like in Java5) _or_ if there are no interfaces methods matching.

For a better explanation, see: http://stackoverflow.com/questions/94361/when-do-you-use-javas-override-annotation-and-why

So now, there are two options:
1- get rid of the @override statements for methods implementing interface methods and apply Java 5 compatibility
2- enforce Java 6 compatibility

Since java 6 is the first real open source implementation of java (openjdk) I don't really mind enforcing java 6 and since it seems a better practice to enable @override whenever you are overriding a method then I would recommend #1.

What do you think?