Merge branch 'stable-3.1' into stable-3.2
* stable-3.1:
ContentTypeUtil: Add singleton scope
Upgrade bazlets to latest stable-3.1 to build with 3.1.12 API
Upgrade bazlets to latest stable-3.0 to build with 3.0.15 API
Upgrade bazlets to latest stable-2.16 to build with 2.16.26 API
Upgrade bazlets to latest stable-2.16 to build with 2.16.23 API
Change-Id: I64539e95e56258e182ff76e509cb8f7d22d5fd9d
diff --git a/src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ContentTypeUtil.java b/src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ContentTypeUtil.java
index bb6f9db..517d245 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ContentTypeUtil.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/uploadvalidator/ContentTypeUtil.java
@@ -24,6 +24,7 @@
import com.google.gerrit.server.config.ProjectConfigEntry;
import com.google.inject.AbstractModule;
import com.google.inject.Inject;
+import com.google.inject.Scopes;
import com.google.inject.name.Named;
import java.io.IOException;
import java.io.InputStream;
@@ -41,7 +42,7 @@
@Override
protected void configure() {
- bind(ContentTypeUtil.class);
+ bind(ContentTypeUtil.class).in(Scopes.SINGLETON);
bind(ProjectConfigEntry.class)
.annotatedWith(Exports.named(KEY_BINARY_TYPES))
.toInstance(