diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-09-30 09:31:12 +0200 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-09-30 09:31:12 +0200 |
commit | bdba9edd5f1212aee33a5bb713c27b80a72617cb (patch) | |
tree | 6ea092d9b6912d269d488218e917d7e4704efede /org.eclipse.jgit.http.server/src | |
parent | 3d86d3e810d3c851d798259209eebfdcd0367516 (diff) | |
download | jgit-bdba9edd5f1212aee33a5bb713c27b80a72617cb.tar.gz jgit-bdba9edd5f1212aee33a5bb713c27b80a72617cb.zip |
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.
Change-Id: I55eff3babb7628aa0627085e65a1b45eb12c2cd3
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.http.server/src')
3 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaFilter.java index f53c8aecbf..772b996616 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaFilter.java @@ -116,7 +116,8 @@ public class MetaFilter implements Filter { private static Set<Object> newIdentitySet() { final Map<Object, Object> m = new IdentityHashMap<>(); - return new AbstractSet<Object>() { + return new AbstractSet<>() { + @Override public boolean add(Object o) { return m.put(o, o) == null; diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java index 91e9f02a65..ebe272885b 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java @@ -35,7 +35,8 @@ final class NoParameterFilterConfig implements FilterConfig { /** {@inheritDoc} */ @Override public Enumeration<String> getInitParameterNames() { - return new Enumeration<String>() { + return new Enumeration<>() { + @Override public boolean hasMoreElements() { return false; diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java index 37fc0283e4..7c5170d0f5 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java @@ -95,7 +95,8 @@ abstract class UrlPipeline { @Override public Enumeration<String> getInitParameterNames() { - return new Enumeration<String>() { + return new Enumeration<>() { + @Override public boolean hasMoreElements() { return false; |