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.pgm.test/tst/org/eclipse/jgit | |
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.pgm.test/tst/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java | 12 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java index c0593a78f3..18c49ea286 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ArchiveTest.java @@ -529,7 +529,7 @@ public class ArchiveTest extends CLIRepositoryTestCase { @Test public void testArchiveWithLongFilename() throws Exception { StringBuilder filename = new StringBuilder(); - List<String> l = new ArrayList<String>(); + List<String> l = new ArrayList<>(); for (int i = 0; i < 20; i++) { filename.append("1234567890/"); l.add(filename.toString()); @@ -549,7 +549,7 @@ public class ArchiveTest extends CLIRepositoryTestCase { @Test public void testTarWithLongFilename() throws Exception { StringBuilder filename = new StringBuilder(); - List<String> l = new ArrayList<String>(); + List<String> l = new ArrayList<>(); for (int i = 0; i < 20; i++) { filename.append("1234567890/"); l.add(filename.toString()); @@ -691,7 +691,7 @@ public class ArchiveTest extends CLIRepositoryTestCase { } private static String[] listZipEntries(byte[] zipData) throws IOException { - List<String> l = new ArrayList<String>(); + List<String> l = new ArrayList<>(); ZipInputStream in = new ZipInputStream( new ByteArrayInputStream(zipData)); @@ -719,7 +719,7 @@ public class ArchiveTest extends CLIRepositoryTestCase { } private String[] listTarEntries(byte[] tarData) throws Exception { - List<String> l = new ArrayList<String>(); + List<String> l = new ArrayList<>(); Process proc = spawnAssumingCommandPresent("tar", "tf", "-"); BufferedReader reader = readFromProcess(proc); OutputStream out = proc.getOutputStream(); @@ -750,7 +750,7 @@ public class ArchiveTest extends CLIRepositoryTestCase { continue; // found! - List<String> l = new ArrayList<String>(); + List<String> l = new ArrayList<>(); BufferedReader reader = new BufferedReader( new InputStreamReader(in, "UTF-8")); String line; @@ -765,7 +765,7 @@ public class ArchiveTest extends CLIRepositoryTestCase { private String[] tarEntryContent(byte[] tarData, String path) throws Exception { - List<String> l = new ArrayList<String>(); + List<String> l = new ArrayList<>(); Process proc = spawnAssumingCommandPresent("tar", "Oxf", "-", path); BufferedReader reader = readFromProcess(proc); OutputStream out = proc.getOutputStream(); diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java index 23aa97eeed..c43accdb6f 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java @@ -73,7 +73,7 @@ public class ConfigTest extends CLIRepositoryTestCase { .equals("Mac OS X"); String[] output = execute("git config --list"); - List<String> expect = new ArrayList<String>(); + List<String> expect = new ArrayList<>(); expect.add("core.filemode=" + !isWindows); expect.add("core.logallrefupdates=true"); if (isMac) |