The following code falsely complains about “Remove this expression which always evaluates to “true””.
public void foo()
{
Boolean b = ...;
if ( b == Boolean.TRUE )
doSomething();
else if ( b == Boolean.FALSE ) // FP
doSomethingElse();
}
‘b’ can also be null. And hence this does not always evaluate to true.