Conditional statements using a condition which cannot be anything but FALSE have the effect of making blocks of code non-functional.
If the condition cannot evaluate to anything but TRUE, the conditional statement is completely redundant, and makes the code less
readable.
It is quite likely that the code does not match the programmer's intent.
Either the condition should be removed or it should be updated so that it does not always evaluate to TRUE or FALSE.
//foo can't be both equal and not equal to bar in the same expression
if( foo == bar && something && foo != bar) {...}
private void compute(int foo) {
int four = 4;
if (foo == four ) {
doSomething();
// We know foo is equal to the four variable at this point, so the next condition is always false
if (foo > four) {...}
...
}
...
}
private void compute(boolean foo) {
if (foo) {
return;
}
doSomething();
// foo is always false here
if (foo){...}
...
}