Remove SshInfo from email templates and move to sysInjector
SshInfo in the web context comes from SshDaemon and thus must be bound in a child of sysInjector. This doesn't work for REST API endpoints, so email template classes cannot depend on SshInfo. The only thing they really need, though, is the advertised SSH address, which comes directly from the server config. Move the server config parsing logic into a module in gerrit-server and inject the lists of listening and advertised addresses into SshDaemon as well as EmailArguments. Change-Id: Iee393e625898c00c3dac02e6a407ecb866a939ff
This commit is contained in:
committed by
Edwin Kempin
parent
386add71e3
commit
107c1bbb3f
@@ -18,7 +18,6 @@ import com.google.gerrit.common.errors.EmailException;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.AccountProjectWatch.NotifyType;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.server.ssh.SshInfo;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
|
||||
@@ -38,9 +37,8 @@ public class ReplacePatchSetSender extends ReplyToChangeSender {
|
||||
private final Set<Account.Id> extraCC = new HashSet<Account.Id>();
|
||||
|
||||
@Inject
|
||||
public ReplacePatchSetSender(EmailArguments ea, SshInfo si, @Assisted Change c) {
|
||||
public ReplacePatchSetSender(EmailArguments ea, @Assisted Change c) {
|
||||
super(ea, c, "newpatchset");
|
||||
setSshInfo(si);
|
||||
}
|
||||
|
||||
public void addReviewers(final Collection<Account.Id> cc) {
|
||||
|
||||
Reference in New Issue
Block a user