Remove more finals from method signatures
Change-Id: I5849ebf378469dcfd5b89bed88c6f7dedf67f7ba Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
parent
0cca74b78a
commit
fd8fa32db1
@ -99,12 +99,12 @@ class OpenIdServiceImpl {
|
||||
|
||||
@Inject
|
||||
OpenIdServiceImpl(
|
||||
final DynamicItem<WebSession> cf,
|
||||
final Provider<IdentifiedUser> iu,
|
||||
DynamicItem<WebSession> cf,
|
||||
Provider<IdentifiedUser> iu,
|
||||
CanonicalWebUrl up,
|
||||
@GerritServerConfig final Config config,
|
||||
final AuthConfig ac,
|
||||
final AccountManager am,
|
||||
@GerritServerConfig Config config,
|
||||
AuthConfig ac,
|
||||
AccountManager am,
|
||||
ProxyProperties proxyProperties) {
|
||||
|
||||
if (proxyProperties.getProxyUrl() != null) {
|
||||
@ -139,9 +139,9 @@ class OpenIdServiceImpl {
|
||||
DiscoveryResult discover(
|
||||
HttpServletRequest req,
|
||||
String openidIdentifier,
|
||||
final SignInMode mode,
|
||||
final boolean remember,
|
||||
final String returnToken) {
|
||||
SignInMode mode,
|
||||
boolean remember,
|
||||
String returnToken) {
|
||||
final State state;
|
||||
state = init(req, openidIdentifier, mode, remember, returnToken);
|
||||
if (state == null) {
|
||||
|
@ -79,7 +79,7 @@ public class JettyServer {
|
||||
private final Config cfg;
|
||||
|
||||
@Inject
|
||||
Lifecycle(JettyServer server, @GerritServerConfig final Config cfg) {
|
||||
Lifecycle(JettyServer server, @GerritServerConfig Config cfg) {
|
||||
this.server = server;
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
@ -85,10 +85,10 @@ public class ProjectQoSFilter implements Filter {
|
||||
|
||||
@Inject
|
||||
ProjectQoSFilter(
|
||||
final Provider<CurrentUser> user,
|
||||
Provider<CurrentUser> user,
|
||||
QueueProvider queue,
|
||||
final ServletContext context,
|
||||
@GerritServerConfig final Config cfg) {
|
||||
ServletContext context,
|
||||
@GerritServerConfig Config cfg) {
|
||||
this.user = user;
|
||||
this.queue = queue;
|
||||
this.context = context;
|
||||
@ -155,7 +155,7 @@ public class ProjectQoSFilter implements Filter {
|
||||
private boolean done;
|
||||
private Thread worker;
|
||||
|
||||
TaskThunk(final WorkQueue.Executor executor, Continuation cont, HttpServletRequest req) {
|
||||
TaskThunk(WorkQueue.Executor executor, Continuation cont, HttpServletRequest req) {
|
||||
this.executor = executor;
|
||||
this.cont = cont;
|
||||
this.name = generateName(req);
|
||||
|
@ -29,7 +29,7 @@ public class Browser {
|
||||
private final Config cfg;
|
||||
|
||||
@Inject
|
||||
Browser(@GerritServerConfig final Config cfg) {
|
||||
Browser(@GerritServerConfig Config cfg) {
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ public class GerritPersonIdentProvider implements Provider<PersonIdent> {
|
||||
private final String email;
|
||||
|
||||
@Inject
|
||||
public GerritPersonIdentProvider(@GerritServerConfig final Config cfg) {
|
||||
public GerritPersonIdentProvider(@GerritServerConfig Config cfg) {
|
||||
String name = cfg.getString("user", null, "name");
|
||||
if (name == null) {
|
||||
name = "Gerrit Code Review";
|
||||
|
@ -73,7 +73,7 @@ class Helper {
|
||||
|
||||
@Inject
|
||||
Helper(
|
||||
@GerritServerConfig final Config config,
|
||||
@GerritServerConfig Config config,
|
||||
@Named(LdapModule.PARENT_GROUPS_CACHE) Cache<String, ImmutableSet<String>> parentGroups) {
|
||||
this.config = config;
|
||||
this.server = LdapRealm.optional(config, "server");
|
||||
|
@ -81,11 +81,9 @@ class LdapRealm extends AbstractRealm {
|
||||
AuthConfig authConfig,
|
||||
EmailExpander emailExpander,
|
||||
LdapGroupBackend groupBackend,
|
||||
@Named(LdapModule.GROUP_CACHE)
|
||||
final LoadingCache<String, Set<AccountGroup.UUID>> membershipCache,
|
||||
@Named(LdapModule.USERNAME_CACHE)
|
||||
final LoadingCache<String, Optional<Account.Id>> usernameCache,
|
||||
@GerritServerConfig final Config config) {
|
||||
@Named(LdapModule.GROUP_CACHE) LoadingCache<String, Set<AccountGroup.UUID>> membershipCache,
|
||||
@Named(LdapModule.USERNAME_CACHE) LoadingCache<String, Optional<Account.Id>> usernameCache,
|
||||
@GerritServerConfig Config config) {
|
||||
this.helper = helper;
|
||||
this.authConfig = authConfig;
|
||||
this.emailExpander = emailExpander;
|
||||
|
@ -24,7 +24,7 @@ public class AnonymousCowardNameProvider implements Provider<String> {
|
||||
private final String anonymousCoward;
|
||||
|
||||
@Inject
|
||||
public AnonymousCowardNameProvider(@GerritServerConfig final Config cfg) {
|
||||
public AnonymousCowardNameProvider(@GerritServerConfig Config cfg) {
|
||||
String anonymousCoward = cfg.getString("user", null, "anonymousCoward");
|
||||
if (anonymousCoward == null) {
|
||||
anonymousCoward = DEFAULT;
|
||||
|
@ -67,7 +67,7 @@ public class AuthConfig {
|
||||
private GitBasicAuthPolicy gitBasicAuthPolicy;
|
||||
|
||||
@Inject
|
||||
AuthConfig(@GerritServerConfig final Config cfg) throws XsrfException {
|
||||
AuthConfig(@GerritServerConfig Config cfg) throws XsrfException {
|
||||
authType = toType(cfg);
|
||||
httpHeader = cfg.getString("auth", null, "httpheader");
|
||||
httpDisplaynameHeader = cfg.getString("auth", null, "httpdisplaynameheader");
|
||||
|
@ -23,7 +23,7 @@ public class CanonicalWebUrlProvider implements Provider<String> {
|
||||
private final String canonicalUrl;
|
||||
|
||||
@Inject
|
||||
public CanonicalWebUrlProvider(@GerritServerConfig final Config config) {
|
||||
public CanonicalWebUrlProvider(@GerritServerConfig Config config) {
|
||||
String u = config.getString("gerrit", null, "canonicalweburl");
|
||||
if (u != null && !u.endsWith("/")) {
|
||||
u += "/";
|
||||
|
@ -40,7 +40,7 @@ public class DownloadConfig {
|
||||
private final ImmutableSet<ArchiveFormat> archiveFormats;
|
||||
|
||||
@Inject
|
||||
DownloadConfig(@GerritServerConfig final Config cfg) {
|
||||
DownloadConfig(@GerritServerConfig Config cfg) {
|
||||
String[] allSchemes = cfg.getStringList("download", null, "scheme");
|
||||
if (allSchemes.length == 0) {
|
||||
downloadSchemes =
|
||||
|
@ -23,7 +23,7 @@ class EmailExpanderProvider implements Provider<EmailExpander> {
|
||||
private final EmailExpander expander;
|
||||
|
||||
@Inject
|
||||
EmailExpanderProvider(@GerritServerConfig final Config cfg) {
|
||||
EmailExpanderProvider(@GerritServerConfig Config cfg) {
|
||||
final String s = cfg.getString("auth", null, "emailformat");
|
||||
if (EmailExpander.Simple.canHandle(s)) {
|
||||
expander = new EmailExpander.Simple(s);
|
||||
|
@ -40,7 +40,7 @@ public class TrackingFootersProvider implements Provider<TrackingFooters> {
|
||||
private static final Logger log = LoggerFactory.getLogger(TrackingFootersProvider.class);
|
||||
|
||||
@Inject
|
||||
TrackingFootersProvider(@GerritServerConfig final Config cfg) {
|
||||
TrackingFootersProvider(@GerritServerConfig Config cfg) {
|
||||
for (String name : cfg.getSubsections(TRACKING_ID_TAG)) {
|
||||
boolean configValid = true;
|
||||
|
||||
|
@ -41,11 +41,10 @@ public class FromAddressGeneratorProvider implements Provider<FromAddressGenerat
|
||||
|
||||
@Inject
|
||||
FromAddressGeneratorProvider(
|
||||
@GerritServerConfig final Config cfg,
|
||||
@AnonymousCowardName final String anonymousCowardName,
|
||||
@GerritPersonIdent final PersonIdent myIdent,
|
||||
final AccountCache accountCache) {
|
||||
|
||||
@GerritServerConfig Config cfg,
|
||||
@AnonymousCowardName String anonymousCowardName,
|
||||
@GerritPersonIdent PersonIdent myIdent,
|
||||
AccountCache accountCache) {
|
||||
final String from = cfg.getString("sendemail", null, "from");
|
||||
final Address srvAddr = toAddress(myIdent);
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class SmtpEmailSender implements EmailSender {
|
||||
private int expiryDays;
|
||||
|
||||
@Inject
|
||||
SmtpEmailSender(@GerritServerConfig final Config cfg) {
|
||||
SmtpEmailSender(@GerritServerConfig Config cfg) {
|
||||
enabled = cfg.getBoolean("sendemail", null, "enable", true);
|
||||
connectTimeout =
|
||||
Ints.checkedCast(
|
||||
|
@ -26,7 +26,7 @@ public class DB2 extends BaseDataSourceType {
|
||||
private Config cfg;
|
||||
|
||||
@Inject
|
||||
public DB2(@GerritServerConfig final Config cfg) {
|
||||
public DB2(@GerritServerConfig Config cfg) {
|
||||
super("com.ibm.db2.jcc.DB2Driver");
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class H2 extends BaseDataSourceType {
|
||||
private final SitePaths site;
|
||||
|
||||
@Inject
|
||||
H2(SitePaths site, @GerritServerConfig final Config cfg) {
|
||||
H2(SitePaths site, @GerritServerConfig Config cfg) {
|
||||
super("org.h2.Driver");
|
||||
this.cfg = cfg;
|
||||
this.site = site;
|
||||
|
@ -28,7 +28,7 @@ class HANA extends BaseDataSourceType {
|
||||
private Config cfg;
|
||||
|
||||
@Inject
|
||||
HANA(@GerritServerConfig final Config cfg) {
|
||||
HANA(@GerritServerConfig Config cfg) {
|
||||
super("com.sap.db.jdbc.Driver");
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ class JDBC extends BaseDataSourceType {
|
||||
protected final Config cfg;
|
||||
|
||||
@Inject
|
||||
JDBC(@GerritServerConfig final Config cfg) {
|
||||
JDBC(@GerritServerConfig Config cfg) {
|
||||
super(ConfigUtil.getRequired(cfg, "database", "driver"));
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class MaxDb extends BaseDataSourceType {
|
||||
private Config cfg;
|
||||
|
||||
@Inject
|
||||
MaxDb(@GerritServerConfig final Config cfg) {
|
||||
MaxDb(@GerritServerConfig Config cfg) {
|
||||
super("com.sap.dbtech.jdbc.DriverSapDB");
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class MySql extends BaseDataSourceType {
|
||||
private Config cfg;
|
||||
|
||||
@Inject
|
||||
MySql(@GerritServerConfig final Config cfg) {
|
||||
MySql(@GerritServerConfig Config cfg) {
|
||||
super("com.mysql.jdbc.Driver");
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class Oracle extends BaseDataSourceType {
|
||||
private Config cfg;
|
||||
|
||||
@Inject
|
||||
public Oracle(@GerritServerConfig final Config cfg) {
|
||||
public Oracle(@GerritServerConfig Config cfg) {
|
||||
super("oracle.jdbc.driver.OracleDriver");
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class PostgreSQL extends BaseDataSourceType {
|
||||
private Config cfg;
|
||||
|
||||
@Inject
|
||||
PostgreSQL(@GerritServerConfig final Config cfg) {
|
||||
PostgreSQL(@GerritServerConfig Config cfg) {
|
||||
super("org.postgresql.Driver");
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
@ -60,11 +60,11 @@ class CommandFactoryProvider implements Provider<CommandFactory>, LifecycleListe
|
||||
|
||||
@Inject
|
||||
CommandFactoryProvider(
|
||||
@CommandName(Commands.ROOT) final DispatchCommandProvider d,
|
||||
@GerritServerConfig final Config cfg,
|
||||
final WorkQueue workQueue,
|
||||
final SshLog l,
|
||||
final SshScope s,
|
||||
@CommandName(Commands.ROOT) DispatchCommandProvider d,
|
||||
@GerritServerConfig Config cfg,
|
||||
WorkQueue workQueue,
|
||||
SshLog l,
|
||||
SshScope s,
|
||||
SchemaFactory<ReviewDb> sf) {
|
||||
dispatcher = d;
|
||||
log = l;
|
||||
|
@ -62,14 +62,14 @@ class DatabasePubKeyAuth implements PublickeyAuthenticator {
|
||||
|
||||
@Inject
|
||||
DatabasePubKeyAuth(
|
||||
final SshKeyCacheImpl skc,
|
||||
final SshLog l,
|
||||
final IdentifiedUser.GenericFactory uf,
|
||||
final PeerDaemonUser.Factory pf,
|
||||
final SitePaths site,
|
||||
final KeyPairProvider hostKeyProvider,
|
||||
@GerritServerConfig final Config cfg,
|
||||
final SshScope s) {
|
||||
SshKeyCacheImpl skc,
|
||||
SshLog l,
|
||||
IdentifiedUser.GenericFactory uf,
|
||||
PeerDaemonUser.Factory pf,
|
||||
SitePaths site,
|
||||
KeyPairProvider hostKeyProvider,
|
||||
@GerritServerConfig Config cfg,
|
||||
SshScope s) {
|
||||
sshKeyCache = skc;
|
||||
sshLog = l;
|
||||
userFactory = uf;
|
||||
@ -162,7 +162,7 @@ class DatabasePubKeyAuth implements PublickeyAuthenticator {
|
||||
return p.keys;
|
||||
}
|
||||
|
||||
private SshKeyCacheEntry find(final Iterable<SshKeyCacheEntry> keyList, PublicKey suppliedKey) {
|
||||
private SshKeyCacheEntry find(Iterable<SshKeyCacheEntry> keyList, PublicKey suppliedKey) {
|
||||
for (SshKeyCacheEntry k : keyList) {
|
||||
if (k.match(suppliedKey)) {
|
||||
return k;
|
||||
|
@ -149,16 +149,16 @@ public class SshDaemon extends SshServer implements SshInfo, LifecycleListener {
|
||||
|
||||
@Inject
|
||||
SshDaemon(
|
||||
final CommandFactory commandFactory,
|
||||
final NoShell noShell,
|
||||
final PublickeyAuthenticator userAuth,
|
||||
final GerritGSSAuthenticator kerberosAuth,
|
||||
final KeyPairProvider hostKeyProvider,
|
||||
final IdGenerator idGenerator,
|
||||
@GerritServerConfig final Config cfg,
|
||||
final SshLog sshLog,
|
||||
@SshListenAddresses final List<SocketAddress> listen,
|
||||
@SshAdvertisedAddresses final List<String> advertised,
|
||||
CommandFactory commandFactory,
|
||||
NoShell noShell,
|
||||
PublickeyAuthenticator userAuth,
|
||||
GerritGSSAuthenticator kerberosAuth,
|
||||
KeyPairProvider hostKeyProvider,
|
||||
IdGenerator idGenerator,
|
||||
@GerritServerConfig Config cfg,
|
||||
SshLog sshLog,
|
||||
@SshListenAddresses List<SocketAddress> listen,
|
||||
@SshAdvertisedAddresses List<String> advertised,
|
||||
MetricMaker metricMaker) {
|
||||
setPort(IANA_SSH_PORT /* never used */);
|
||||
|
||||
|
@ -26,7 +26,7 @@ class StreamCommandExecutorProvider implements Provider<WorkQueue.Executor> {
|
||||
private final WorkQueue queues;
|
||||
|
||||
@Inject
|
||||
StreamCommandExecutorProvider(@GerritServerConfig final Config config, WorkQueue wq) {
|
||||
StreamCommandExecutorProvider(@GerritServerConfig Config config, WorkQueue wq) {
|
||||
final int cores = Runtime.getRuntime().availableProcessors();
|
||||
poolSize = config.getInt("sshd", "streamThreads", cores + 1);
|
||||
queues = wq;
|
||||
|
Loading…
Reference in New Issue
Block a user