Description:
The method returning non-void type is called at least once, but its return value is never used. For methods that are not used, "Method is never executed" warning is reported instead. Method overriding is considered, i.e. it is supposed that if a concrete method is called, all methods from derived classes that override it can be called instead of this method.
Example:
class Base {
void h() {
// RVNU assumes that return values of both
// Base.f and Derived.f are used
int i = f();
// Return value of Base.g is not used
g();
}
public int f() {
return 0;
}
public int g() {
return 0;
}
}
class Derived {
public int f() {
return 1;
}
}