Ryan Gustafson - 2008-03-19

Logged In: YES
user_id=342470
Originator: NO

This example is strange. How can TestB override the methods on TestA, and not have it's own field of some sort? TestA.field is declared private, and TestB's implementation is not calling super.getField().

Is the intent of the rule to state there is a trivial override occurring in a subclass? E.g. no extra behavior beyond that already defined in the super class?

We already catch calls to just super.method(). Verifying the implementation is distinctly different is another matter entirely, requiring parsing of multiple source files at the same time, something PMD does not currently do. That's assuming we even have the code for TestA available, it might be a super class which exists in some JAR alone.