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:
@@ -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);
|
||||
|
||||
@@ -52,20 +52,17 @@ public class CommentSender extends ReplyToChangeSender {
|
||||
.getLogger(CommentSender.class);
|
||||
|
||||
public static interface Factory {
|
||||
CommentSender create(NotifyHandling notify, Change.Id id);
|
||||
CommentSender create(Change.Id id);
|
||||
}
|
||||
|
||||
private final NotifyHandling notify;
|
||||
private List<PatchLineComment> inlineComments = Collections.emptyList();
|
||||
private final PatchLineCommentsUtil plcUtil;
|
||||
|
||||
@Inject
|
||||
public CommentSender(EmailArguments ea,
|
||||
PatchLineCommentsUtil plcUtil,
|
||||
@Assisted NotifyHandling notify,
|
||||
@Assisted Change.Id id) throws OrmException {
|
||||
super(ea, "comment", newChangeData(ea, id));
|
||||
this.notify = notify;
|
||||
this.plcUtil = plcUtil;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user