resources.report.rules.pmd.UselessOverridingMethod.html Maven / Gradle / Ivy
UselessOverridingMethod
UselessOverridingMethod
The overriding method merely calls the same method defined in a superclass.
This rule is defined by the following Java class: net.sourceforge.pmd.lang.java.rule.unnecessary.UselessOverridingMethodRule
Example(s):
public void foo(String bar) {
super.foo(bar); // why bother overriding?
}
public String foo() {
return super.foo(); // why bother overriding?
}
@Id
public Long getId() {
return super.getId(); // OK if 'ignoreAnnotations' is false, which is the default behavior
}