The UselessParentheses rule gets triggered by the following method:
public static int thisShouldBreak(final int x, final int y, final int z) { return x - (y + z); }
PMD feels that the parentheses around "y + z" are useless, however you cannot simply fix the rule by removing the parentheses because x - (y + z) != x - y + z but instead x - y - z.
Is PMD suggesting that we distribute the negative as part of removing the parentheses?
Thank you!
This will be fixed with the next PMD release (5.1.3).