1

It'd be nice to be able to tell if you're accidentally overriding a method in a subclass, I know that java doesn't have a constraint to do this (be nice if it did), do any of the static or bytecode analysis tools allow you to require the @Override annotation in subclasses?

I've used checkstyle, findbugs, and pmd, but I don't know if any of them have this setting.Note: I would like the tool to be able to run as part of my automated test suite.

xenoterracide
  • 16,274
  • 24
  • 118
  • 243
  • Pretty sure Sonar will throw a warning at you for missing Override annotations. Your editor can help as well. Not sure if you are using eclipse, but you can have it add Override as part of saving. – Nick DeFazio Oct 24 '15 at 21:42
  • @spoonybard896 yeah I was just about to add want something that I can run as part of the test suite, it's nice that IDE's can highlight it, and whatever, but, getting devs to follow that... – xenoterracide Oct 24 '15 at 21:43

0 Answers0