UselessParentheses false positive on multiple equality operators
A source code analyzer
Brought to you by:
adangel,
juansotuyo
PMD rejects a line of code that checks two values to see whether they are either both null, or both non-null, complaining that the parentheses are useless:
return (a == null) == (b == null);
However, I can't see a way to re-write this correctly and concisely without the parentheses.
Thanks for the bug report. This will be fixed with the next release (PMD 5.3.3).
Commit: https://github.com/pmd/pmd/commit/d28e4f1fb5bf09e501d4336e10838507c5d13dec