commit | d8815bf9660b6655696db242b8ad2801e866c036 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Tue Jan 11 15:22:52 2022 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Tue Jan 11 15:24:27 2022 +0100 |
tree | 32afca925817194e772a104df57b551380ae215c | |
parent | 7830135fd85ff9de10a8ca1f2e6112af59fca15f [diff] |
Remove redundant type arguments In Java 11 type arguments for anonymous subclasses can be inferred and don't need to be specified. This resolves a number of compiler warnings. This is Java 8 incompatible change, but that's fine because Gerrit core also removed redundant type arguments (see change If9ebda63f). Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I5602f5028024606f279366b4d9ec4db698927996
diff --git a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/ProjectWebhooksResource.java b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/ProjectWebhooksResource.java index d27649d..739f365 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/ProjectWebhooksResource.java +++ b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/ProjectWebhooksResource.java
@@ -22,7 +22,7 @@ public class ProjectWebhooksResource implements RestResource { public static final TypeLiteral<RestView<ProjectWebhooksResource>> PROJECT_WEBHOOK_KIND = - new TypeLiteral<RestView<ProjectWebhooksResource>>() {}; + new TypeLiteral<>() {}; private final Project.NameKey project;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/RemoteResource.java b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/RemoteResource.java index 92b1aa0..b6ae9bb 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/RemoteResource.java +++ b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/RemoteResource.java
@@ -21,8 +21,7 @@ import com.googlesource.gerrit.plugins.webhooks.RemoteConfig; public class RemoteResource implements RestResource { - public static final TypeLiteral<RestView<RemoteResource>> REMOTE_KIND = - new TypeLiteral<RestView<RemoteResource>>() {}; + public static final TypeLiteral<RestView<RemoteResource>> REMOTE_KIND = new TypeLiteral<>() {}; private final Project.NameKey project; private final RemoteConfig rc;