CommentSender: Fix warning about hiding field notify

OutgoingEmail is aware of the notify option now and it has a setter
for it. Use this notify option in CommentSender rather than defining
it again.

Change-Id: I9476dee4880239ab19468fbf1a65cd3049c6547d
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2016-02-01 10:15:05 +01:00
parent 8f251d6687
commit 96ddc5f3e6
2 changed files with 3 additions and 5 deletions

View File

@@ -105,11 +105,12 @@ public class EmailReviewComments implements Runnable, RequestContext {
RequestContext old = requestContext.setContext(this);
try {
CommentSender cm = commentSenderFactory.create(notify, change.getId());
CommentSender cm = commentSenderFactory.create(change.getId());
cm.setFrom(authorId);
cm.setPatchSet(patchSet, patchSetInfoFactory.get(change, patchSet));
cm.setChangeMessage(message);
cm.setPatchLineComments(comments);
cm.setNotify(notify);
cm.send();
} catch (Exception e) {
log.error("Cannot email comments for " + patchSet.getId(), e);