diff --git a/Documentation/rest-api-accounts.txt b/Documentation/rest-api-accounts.txt index aeb7b5d80d..ac5bd54a3c 100644 --- a/Documentation/rest-api-accounts.txt +++ b/Documentation/rest-api-accounts.txt @@ -113,7 +113,7 @@ If the account does not have a name an empty string is returned. Sets the full name of an account. The new account name must be provided in the request body inside -a link:#account-name-input[AccountNameInput] entity. +an link:#account-name-input[AccountNameInput] entity. .Request ---- diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java index 4e45b1ead8..d9ec66993d 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java @@ -156,14 +156,16 @@ public class PostReview implements RestModifyView } else { indexWrite = Futures. immediateCheckedFuture(null); } - if (input.notify.compareTo(NotifyHandling.NONE) > 0 && message != null) { - email.create( - input.notify, - change, - revision.getPatchSet(), - revision.getAccountId(), - message, - comments).sendAsync(); + if (message != null) { + if (input.notify.compareTo(NotifyHandling.NONE) > 0) { + email.create( + input.notify, + change, + revision.getPatchSet(), + revision.getAccountId(), + message, + comments).sendAsync(); + } fireCommentAddedHook(revision); }