The inspection doesn't report methods overridden from java.lang.Object
, except for clone()
.
The clone()
method should by convention call its super method,
which will return an object of the correct type.
Example 1:
class A {
@Override
public Object clone() {
// does not call 'super.clone()'
return new A();
}
}
Example 2:
interface I {
default void foo() {}
}
class A implements I {
// warning on method when
// 'Ignore 'default' super methods' is disabled
@Override
public void foo(){}
}
Configure the inspection:
default
super methods from interfaces.