From 3b4448637fbb9d74e0c9d44048ba76bb7c1214ce Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 20 Feb 2017 13:17:27 +0900 Subject: 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 --- .../src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java | 4 ++-- org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'org.eclipse.jgit.pgm.test/src') diff --git a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java index 0bc2a3f8db..0eeababc5d 100644 --- a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java +++ b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/lib/CLIRepositoryTestCase.java @@ -79,7 +79,7 @@ public class CLIRepositoryTestCase extends LocalDiskRepositoryTestCase { * @throws Exception */ protected String[] executeUnchecked(String... cmds) throws Exception { - List result = new ArrayList(cmds.length); + List result = new ArrayList<>(cmds.length); for (String cmd : cmds) { result.addAll(CLIGitCommand.executeUnchecked(cmd, db)); } @@ -97,7 +97,7 @@ public class CLIRepositoryTestCase extends LocalDiskRepositoryTestCase { * @throws Exception */ protected String[] execute(String... cmds) throws Exception { - List result = new ArrayList(cmds.length); + List result = new ArrayList<>(cmds.length); for (String cmd : cmds) { Result r = CLIGitCommand.executeRaw(cmd, db); if (r.ex instanceof TerminatedByHelpException) { diff --git a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java index 2d0c8974eb..69eb1989d7 100644 --- a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java +++ b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java @@ -189,7 +189,7 @@ public class CLIGitCommand extends Main { * @return the array */ static String[] split(String commandLine) { - final List list = new ArrayList(); + final List list = new ArrayList<>(); boolean inquote = false; boolean inDblQuote = false; StringBuilder r = new StringBuilder(); -- cgit v1.2.3