diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2017-02-20 13:17:27 +0900 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2017-02-20 22:47:23 +0100 |
commit | 3b4448637fbb9d74e0c9d44048ba76bb7c1214ce (patch) | |
tree | 85bbb116d5b0336cb365a3f5a4d6c074afe80cc6 /org.eclipse.jgit.http.server | |
parent | 43eb8511f5d8225c0b4e2f899db2126334e5facf (diff) | |
download | jgit-3b4448637fbb9d74e0c9d44048ba76bb7c1214ce.tar.gz jgit-3b4448637fbb9d74e0c9d44048ba76bb7c1214ce.zip |
Enable and fix warnings about redundant specification of type arguments
Since the introduction of generic type parameter inference in Java 7,
it's not necessary to explicitly specify the type of generic parameters.
Enable the warning in Eclipse, and fix all occurrences.
Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.http.server')
4 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.jgit.http.server/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.http.server/.settings/org.eclipse.jdt.core.prefs index adfb7aa3b5..4d260cf480 100644 --- a/org.eclipse.jgit.http.server/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.http.server/.settings/org.eclipse.jdt.core.prefs @@ -76,7 +76,7 @@ org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java index 529b8391fa..807037155c 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java @@ -95,9 +95,9 @@ public class GitFilter extends MetaFilter { private ReceivePackFactory<HttpServletRequest> receivePackFactory = new DefaultReceivePackFactory(); - private final List<Filter> uploadPackFilters = new LinkedList<Filter>(); + private final List<Filter> uploadPackFilters = new LinkedList<>(); - private final List<Filter> receivePackFilters = new LinkedList<Filter>(); + private final List<Filter> receivePackFilters = new LinkedList<>(); /** * New servlet that will load its base directory from {@code web.xml}. 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 800c5d4fee..adb6c425df 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 @@ -89,7 +89,7 @@ public class MetaFilter implements Filter { /** Empty filter with no bindings. */ public MetaFilter() { - this.bindings = new ArrayList<ServletBinderImpl>(); + this.bindings = new ArrayList<>(); } /** @@ -144,7 +144,7 @@ public class MetaFilter implements Filter { } private static Set<Object> newIdentitySet() { - final Map<Object, Object> m = new IdentityHashMap<Object, Object>(); + final Map<Object, Object> m = new IdentityHashMap<>(); return new AbstractSet<Object>() { @Override public boolean add(Object o) { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinderImpl.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinderImpl.java index c2b0370977..4e879a9760 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinderImpl.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinderImpl.java @@ -58,7 +58,7 @@ abstract class ServletBinderImpl implements ServletBinder { private HttpServlet httpServlet; ServletBinderImpl() { - this.filters = new ArrayList<Filter>(); + this.filters = new ArrayList<>(); } @Override |