UselessOverridingMethod not valid if target method changes protected method...
A source code analyzer
Brought to you by:
adangel,
juansotuyo
This code is triggering UselessOverridingMethod issue but if target modifier is less strict then it is not a useless overriding method. Test needs to check the modifiers if making method less strict.
http://pmd.sourceforge.net/pmd-5.3.2/pmd-java/rules/java/unnecessary.html#UselessOverridingMethod
public class Foo extends Bar {
// following method flagged as UselessOverridingMethod
public void setName(String str) {
super.setName(str);
}
}
public class Bar {
protected void setName(String str) {
super.setName(str);
}
}
I guess, this is similar as [#807].
Related
Issues: #807