Fix use of TypeLiteral<> of PullReplicationFilter
The use of Type<> was incorrect when used in the injection of
Guice generic types. Replace Type<> with the more appropriate
TypeLiteral<>.
Change-Id: Ia8e3b151e5a30d182861b588d880972d728539a0
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/api/PullReplicationFilter.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/api/PullReplicationFilter.java
index 7b086a7..2c0701b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/api/PullReplicationFilter.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/api/PullReplicationFilter.java
@@ -25,7 +25,6 @@
import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED;
import com.google.common.flogger.FluentLogger;
-import com.google.common.reflect.TypeToken;
import com.google.gerrit.entities.Project;
import com.google.gerrit.extensions.annotations.PluginName;
import com.google.gerrit.extensions.api.projects.HeadInput;
@@ -231,7 +230,7 @@
@SuppressWarnings("unchecked")
private Response<Map<String, Object>> doBatchApplyObject(HttpServletRequest httpRequest)
throws RestApiException, IOException {
- TypeToken<List<RevisionInput>> collectionType = new TypeToken<>() {};
+ TypeLiteral<List<RevisionInput>> collectionType = new TypeLiteral<>() {};
List<RevisionInput> inputs = readJson(httpRequest, collectionType.getType());
IdString id = getProjectName(httpRequest).get();
@@ -275,7 +274,7 @@
@SuppressWarnings("unchecked")
private Response<Map<String, Object>> doBatchFetch(HttpServletRequest httpRequest)
throws IOException, RestApiException {
- TypeToken<List<Input>> collectionType = new TypeToken<>() {};
+ TypeLiteral<List<Input>> collectionType = new TypeLiteral<>() {};
List<Input> inputs = readJson(httpRequest, collectionType.getType());
IdString id = getProjectName(httpRequest).get();