Merge changes I8359a0fe,Id4dbe193

* changes:
  MailUtil: Suppress deprecation warning for usage of AccountResolver#resolveByNameOrEmail
  ReviewerAdder: Remove redundant null checks
diff --git a/java/com/google/gerrit/server/change/ReviewerAdder.java b/java/com/google/gerrit/server/change/ReviewerAdder.java
index 8fc7102..e4b1f28 100644
--- a/java/com/google/gerrit/server/change/ReviewerAdder.java
+++ b/java/com/google/gerrit/server/change/ReviewerAdder.java
@@ -227,8 +227,7 @@
       }
     }
 
-    if (byAccountId != null
-        && wholeGroup != null
+    if (wholeGroup != null
         && byAccountId.failureType == FailureType.NOT_FOUND
         && wholeGroup.failureType == FailureType.NOT_FOUND) {
       return fail(
@@ -237,7 +236,7 @@
           byAccountId.result.error + "\n" + wholeGroup.result.error);
     }
 
-    if (byAccountId != null && byAccountId.failureType != FailureType.NOT_FOUND) {
+    if (byAccountId.failureType != FailureType.NOT_FOUND) {
       return byAccountId;
     }
     if (wholeGroup != null) {
diff --git a/java/com/google/gerrit/server/mail/MailUtil.java b/java/com/google/gerrit/server/mail/MailUtil.java
index d50df80..3a5a2cf 100644
--- a/java/com/google/gerrit/server/mail/MailUtil.java
+++ b/java/com/google/gerrit/server/mail/MailUtil.java
@@ -60,6 +60,7 @@
     return recipients;
   }
 
+  @SuppressWarnings("deprecation")
   private static Account.Id toAccountId(AccountResolver accountResolver, String nameOrEmail)
       throws OrmException, UnprocessableEntityException, IOException, ConfigInvalidException {
     return accountResolver.resolveByNameOrEmail(nameOrEmail).asUnique().getAccount().getId();