Affects PMD Version: 7.0.0-rc4
Rule: SimplifyBooleanReturns
Description:
I think, the suggested solution would result in wrong code.
Code Sample demonstrating the issue:
if (a == null) {
return false;
}
return "FOO".equals(a.toString());
The suggestion is:
This if statement can be replaced by `return !{condition} || {elseBranch};`.
I think, this is wrong, it should be
This if statement can be replaced by `return !{condition} && {elseBranch};`.
Affects PMD Version: 7.0.0-rc4
Rule: SimplifyBooleanReturns
Description:
I think, the suggested solution would result in wrong code.
Code Sample demonstrating the issue:
The suggestion is:
I think, this is wrong, it should be