Fix ErrorProne issues for JavaLangClash bug pattern
This requires renaming Module classes that clash with java.lang.Module.
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Ic094fd30aea87433ff8063afc44427350309ff85
diff --git a/BUILD b/BUILD
index d5a550f..d08738a 100644
--- a/BUILD
+++ b/BUILD
@@ -11,7 +11,7 @@
srcs = glob(["src/main/java/**/*.java"]),
manifest_entries = [
"Gerrit-PluginName: webhooks",
- "Gerrit-Module: com.googlesource.gerrit.plugins.webhooks.Module",
+ "Gerrit-Module: com.googlesource.gerrit.plugins.webhooks.PluginModule",
"Implementation-Title: webhooks plugin",
"Implementation-URL: https://gerrit-review.googlesource.com/#/admin/projects/plugins/webhooks",
"Implementation-Vendor: Gerrit Code Review",
diff --git a/src/main/java/com/googlesource/gerrit/plugins/webhooks/Module.java b/src/main/java/com/googlesource/gerrit/plugins/webhooks/PluginModule.java
similarity index 95%
rename from src/main/java/com/googlesource/gerrit/plugins/webhooks/Module.java
rename to src/main/java/com/googlesource/gerrit/plugins/webhooks/PluginModule.java
index edaaeff..a4d446f 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/webhooks/Module.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/webhooks/PluginModule.java
@@ -29,11 +29,11 @@
import java.util.concurrent.ScheduledExecutorService;
import org.apache.http.impl.client.CloseableHttpClient;
-public class Module extends FactoryModule {
+public class PluginModule extends FactoryModule {
private final ProcessorModule processors;
@Inject
- public Module(ProcessorModule processors) {
+ public PluginModule(ProcessorModule processors) {
this.processors = processors;
}
diff --git a/src/test/java/com/googlesource/gerrit/plugins/webhooks/rest/GetRemoteIT.java b/src/test/java/com/googlesource/gerrit/plugins/webhooks/rest/GetRemoteIT.java
index 0521a73..5b17a56 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/webhooks/rest/GetRemoteIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/webhooks/rest/GetRemoteIT.java
@@ -34,7 +34,7 @@
import org.eclipse.jgit.transport.RefSpec;
import org.junit.Test;
-@TestPlugin(name = "webhooks", sysModule = "com.googlesource.gerrit.plugins.webhooks.Module")
+@TestPlugin(name = "webhooks", sysModule = "com.googlesource.gerrit.plugins.webhooks.PluginModule")
public class GetRemoteIT extends LightweightPluginDaemonTest {
@Test
diff --git a/src/test/java/com/googlesource/gerrit/plugins/webhooks/rest/UpdateRemoteIT.java b/src/test/java/com/googlesource/gerrit/plugins/webhooks/rest/UpdateRemoteIT.java
index cb6f0c7..4ffbf89 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/webhooks/rest/UpdateRemoteIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/webhooks/rest/UpdateRemoteIT.java
@@ -32,7 +32,7 @@
import org.junit.Before;
import org.junit.Test;
-@TestPlugin(name = "webhooks", sysModule = "com.googlesource.gerrit.plugins.webhooks.Module")
+@TestPlugin(name = "webhooks", sysModule = "com.googlesource.gerrit.plugins.webhooks.PluginModule")
public class UpdateRemoteIT extends LightweightPluginDaemonTest {
private String fooEndpoint;