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};`.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4