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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user