ListMailFilter: Fix operator precedence warning raised by ErrorProne

Add grouping parenthesis to make the operator precedence explicit.

See http://errorprone.info/bugpattern/OperatorPrecedence

Change-Id: Ica10d3e1494e9109883ef0c327015e423e91dd31
This commit is contained in:
David Pursehouse
2018-09-06 17:38:13 +09:00
parent 8cf9a823ea
commit 429687d2ad

View File

@@ -54,7 +54,8 @@ public class ListMailFilter implements MailFilter {
}
boolean match = mailPattern.matcher(message.from().email).find();
if (mode == ListFilterMode.WHITELIST && !match || mode == ListFilterMode.BLACKLIST && match) {
if ((mode == ListFilterMode.WHITELIST && !match)
|| (mode == ListFilterMode.BLACKLIST && match)) {
log.info("Mail message from " + message.from() + " rejected by list filter");
return false;
}