Category: pmd
Rule Key: pmd:LogicInversion
⚠️ This rule is deprecated in favour of S1940.
Use opposite operator instead of negating the whole expression with a logic complement operator. Example:
public boolean bar(int a, int b) { if (!(a == b)) // use != return false; if (!(a < b)) // use >= return false; return true; }