Fix errorprone for SshModule
Summary:
Reference https://gerrit-review.googlesource.com/c/gerrit/+/400622
See https://errorprone.info/bugpattern/MutableGuiceModule
Test Plan:
Before:
public class SshModule extends PluginCommandModule {
required: String
found: no arguments
reason: actual and formal argument lists differ in length
Target //plugins/audit-sl4j:audit-sl4j failed to build
ERROR: Build did NOT complete successfully
After:
bazelisk build --verbose_failures audit-sl4j:audit-sl4j
Target //plugins/audit-sl4j:audit-sl4j up-to-date:
bazel-bin/plugins/audit-sl4j/audit-sl4j.jar
INFO: Elapsed time: 0.522s, Critical Path: 0.43s
INFO: 5 processes: 1 internal, 3 linux-sandbox, 1 worker.
INFO: Build completed successfully, 5 total actions
Gerrit log:
com.google.gerrit.server.plugins.PluginLoader
Loaded plugin audit-sl4j, version v3.3.0-9-gd4b3a97
Change-Id: I8119e531156bb8920b61bc7afe8636d634f4b12e
Signed-off-by: Filip Stefanov <fstefanov@mm-sol.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/auditsl4j/SshModule.java b/src/main/java/com/googlesource/gerrit/plugins/auditsl4j/SshModule.java
index 125b2fc..6dbbd1a 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/auditsl4j/SshModule.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/auditsl4j/SshModule.java
@@ -14,9 +14,15 @@
package com.googlesource.gerrit.plugins.auditsl4j;
+import com.google.gerrit.extensions.annotations.PluginName;
import com.google.gerrit.sshd.PluginCommandModule;
+import com.google.inject.Inject;
public class SshModule extends PluginCommandModule {
+ @Inject
+ SshModule(@PluginName String pluginName) {
+ super(pluginName);
+ }
@Override
protected void configureCommands() {
command(TransformLogsCommand.class);