Bind ReplicationConfig explicitly Binding ReplicationConfig explicitly does not change Guice's default behavior. We may still want to use this if we prefer our ReplicationModule class to serve as an explicit manifest for the services it provides. Also, in rare cases, Guice may be unable to validate a binding at injector creation time unless it is given explicitly. Please refer http://google-guice.googlecode.com/git/javadoc/com/google/inject/Binder.html Change-Id: If3548b8b120fca634b833c358f7c8c89485049c8
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationModule.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationModule.java index f3609e5..4b3b730 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationModule.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationModule.java
@@ -32,6 +32,7 @@ class ReplicationModule extends AbstractModule { @Override protected void configure() { + bind(ReplicationConfig.class); bind(ReplicationQueue.class).in(Scopes.SINGLETON); DynamicSet.bind(binder(), GitReferenceUpdatedListener.class)