Merge "AddReviewersOp: Remove unneeded variable assignment"

This commit is contained in:
Edwin Kempin 2019-09-10 09:37:27 +00:00 committed by Gerrit Code Review
commit 9bb8974dbd

View File

@ -181,12 +181,11 @@ public class AddReviewersOp implements BatchUpdateOp {
}
}
ImmutableList<Address> addressesToAdd = ImmutableList.of();
ReviewerStateInternal internalState = ReviewerStateInternal.fromReviewerState(state);
// TODO(dborowitz): This behavior should live in ApprovalsUtil or something, like addCcs does.
ImmutableSet<Address> existing = ctx.getNotes().getReviewersByEmail().byState(internalState);
addressesToAdd =
ImmutableList<Address> addressesToAdd =
addresses.stream().filter(a -> !existing.contains(a)).collect(toImmutableList());
if (state == CC) {