Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find all methods overriding superclass/interface methods without @Override annotation?

It's clear that having @Override annotation on overriding methods is a good practice. Is there an automatic way of finding all methods that miss the @Override annotation in a project? A script, search technique in any IDE would help

like image 881
Boris Pavlović Avatar asked Feb 11 '11 09:02

Boris Pavlović


1 Answers

Eclipse shows warnings if you are missing @Override. You can go to:

Window > Preferences > Java > Compiler > Errors/Warnings > Annotations

You can choose to have warning or even error for "Missing @Override annotation".

like image 92
Bozho Avatar answered Oct 12 '22 08:10

Bozho