From 4c4e822e8a4795df419839daa7326a1c97eb957a Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 19 May 2011 11:58:47 -0700 Subject: [PATCH] Delete unused setDest() in MergedSender We moved the private instance member this used to populate, as it was never read (and is thus dead code). But we forgot to also delete the now-dead setter. Change-Id: I5ef5897c58f32c88908c5134ef8221b1d938f970 Signed-off-by: Shawn O. Pearce --- .../java/com/google/gerrit/server/git/ReceiveCommits.java | 2 -- .../java/com/google/gerrit/server/mail/MergedSender.java | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java index 51e4bcc2f1..969e98c73c 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java @@ -1879,8 +1879,6 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook { final MergedSender cm = mergedSenderFactory.create(result.change); cm.setFrom(currentUser.getAccountId()); cm.setPatchSet(result.patchSet, result.info); - cm.setDest(new Branch.NameKey(project.getNameKey(), - result.mergedIntoRef)); cm.send(); } catch (EmailException e) { final PatchSet.Id psi = result.patchSet.getId(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/mail/MergedSender.java b/gerrit-server/src/main/java/com/google/gerrit/server/mail/MergedSender.java index a32a5789b9..9dbabe6fab 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/mail/MergedSender.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/mail/MergedSender.java @@ -18,12 +18,11 @@ import com.google.gerrit.common.data.ApprovalType; import com.google.gerrit.common.data.ApprovalTypes; import com.google.gerrit.reviewdb.Account; import com.google.gerrit.reviewdb.AccountProjectWatch; +import com.google.gerrit.reviewdb.AccountProjectWatch.NotifyType; import com.google.gerrit.reviewdb.ApprovalCategory; import com.google.gerrit.reviewdb.ApprovalCategoryValue; -import com.google.gerrit.reviewdb.Branch; import com.google.gerrit.reviewdb.Change; import com.google.gerrit.reviewdb.PatchSetApproval; -import com.google.gerrit.reviewdb.AccountProjectWatch.NotifyType; import com.google.gwtorm.client.OrmException; import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; @@ -45,9 +44,6 @@ public class MergedSender extends ReplyToChangeSender { approvalTypes = at; } - public void setDest(final Branch.NameKey key) { - } - @Override protected void init() throws EmailException { super.init();