Merge branch 'stable-3.9'

* stable-3.9:
  Add missing `return` statement

Change-Id: Idc7ac3d2f7c71ab7e9ff4b17aa27798b3e56ae95
diff --git a/src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckConfig.java b/src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckConfig.java
index 1dc143c..93cf563 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckConfig.java
@@ -22,7 +22,6 @@
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Strings;
 import com.google.gerrit.entities.Project;
-import com.google.gerrit.extensions.annotations.PluginName;
 import com.google.gerrit.server.config.AllProjectsName;
 import com.google.gerrit.server.config.AllUsersName;
 import com.google.gerrit.server.config.GerritIsReplica;
@@ -39,6 +38,7 @@
 
 @Singleton
 public class HealthCheckConfig {
+  public static final String HEALTHCHECK_PLUGIN_NAME = "healthcheck";
   public static final String HEALTHCHECK = "healthcheck";
   public static final HealthCheckConfig DEFAULT_CONFIG = new HealthCheckConfig(null);
   private static final long HEALTHCHECK_TIMEOUT_DEFAULT = 500L;
@@ -61,11 +61,10 @@
   @Inject
   public HealthCheckConfig(
       PluginConfigFactory configFactory,
-      @PluginName String pluginName,
       AllProjectsName allProjectsName,
       AllUsersName allUsersName,
       @GerritIsReplica boolean isReplica) {
-    config = configFactory.getGlobalPluginConfig(pluginName);
+    config = configFactory.getGlobalPluginConfig(HEALTHCHECK_PLUGIN_NAME);
     this.allProjectsName = allProjectsName;
     this.allUsersName = allUsersName;
     this.isReplica = isReplica;
diff --git a/src/main/resources/Documentation/extensions.md b/src/main/resources/Documentation/extensions.md
index ccc07c7..6477b39 100644
--- a/src/main/resources/Documentation/extensions.md
+++ b/src/main/resources/Documentation/extensions.md
@@ -54,6 +54,11 @@
 }
 ```
 
+Finally, you will need to register your plugin's healthcheck in the plugin's `Module` class:
+```java
+DynamicSet.bind(binder(), HealthCheck.class).to(FooHealthCheck.class);
+```
+
 To build the plugin in the gerrit-CI, as
 [documented](https://gerrit-review.googlesource.com/Documentation/dev-plugins.html#_cross_plugin_communication)
 by gerrit, you should be configuring your build job as follows: