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
@@ -20,7 +20,6 @@ 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.mail.ProjectWatch.Watchers;
|
||||
import com.google.gerrit.server.ssh.SshInfo;
|
||||
import com.google.gwtorm.server.OrmException;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
@@ -38,9 +37,8 @@ public class CreateChangeSender extends NewChangeSender {
|
||||
}
|
||||
|
||||
@Inject
|
||||
public CreateChangeSender(EmailArguments ea, SshInfo si, @Assisted Change c) {
|
||||
public CreateChangeSender(EmailArguments ea, @Assisted Change c) {
|
||||
super(ea, c);
|
||||
setSshInfo(si);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user