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.test/tst/org/eclipse/jgit/api | |
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.test/tst/org/eclipse/jgit/api')
6 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java index 40545ce2a4..edab96b971 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java @@ -192,7 +192,7 @@ public class ArchiveCommandTest extends RepositoryTestCase { private class MockFormat implements ArchiveCommand.Format<MockOutputStream> { - private Map<String, String> entries = new HashMap<String, String>(); + private Map<String, String> entries = new HashMap<>(); private int size() { return entries.size(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java index fd42ca5b3d..85436db472 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java @@ -144,7 +144,7 @@ public class CleanCommandTest extends RepositoryTestCase { assertTrue(files.size() > 0); // run clean with setPaths - Set<String> paths = new TreeSet<String>(); + Set<String> paths = new TreeSet<>(); paths.add("File3.txt"); Set<String> cleanedFiles = git.clean().setPaths(paths).call(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java index e7a84f2d1d..ae0b8dd3c2 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java @@ -88,7 +88,7 @@ public class CloneCommandTest extends RepositoryTestCase { @Override public void setUp() throws Exception { super.setUp(); - tr = new TestRepository<Repository>(db); + tr = new TestRepository<>(db); git = new Git(db); // commit something diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogCommandTest.java index 1310625a9b..38178bfd0e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LogCommandTest.java @@ -62,7 +62,7 @@ public class LogCommandTest extends RepositoryTestCase { @Test public void logAllCommits() throws Exception { - List<RevCommit> commits = new ArrayList<RevCommit>(); + List<RevCommit> commits = new ArrayList<>(); Git git = Git.wrap(db); writeTrashFile("Test.txt", "Hello world"); @@ -94,7 +94,7 @@ public class LogCommandTest extends RepositoryTestCase { @Test public void logAllCommitsWithTag() throws Exception { - List<RevCommit> commits = new ArrayList<RevCommit>(); + List<RevCommit> commits = new ArrayList<>(); Git git = Git.wrap(db); writeTrashFile("Test.txt", "Hello world"); @@ -123,7 +123,7 @@ public class LogCommandTest extends RepositoryTestCase { } private List<RevCommit> createCommits(Git git) throws Exception { - List<RevCommit> commits = new ArrayList<RevCommit>(); + List<RevCommit> commits = new ArrayList<>(); writeTrashFile("Test.txt", "Hello world"); git.add().addFilepattern("Test.txt").call(); commits.add(git.commit().setMessage("commit#1").call()); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java index cb3dbf1bc2..4b23349fa6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java @@ -1556,7 +1556,7 @@ public class MergeCommandTest extends RepositoryTestCase { @Test public void testRecursiveMergeWithConflict() throws Exception { - TestRepository<Repository> db_t = new TestRepository<Repository>(db); + TestRepository<Repository> db_t = new TestRepository<>(db); BranchBuilder master = db_t.branch("master"); RevCommit m0 = master.commit().add("f", "1\n2\n3\n4\n5\n6\n7\n8\n9\n") .message("m0").create(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/NameRevCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/NameRevCommandTest.java index bd62200fce..138b7afcd6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/NameRevCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/NameRevCommandTest.java @@ -64,7 +64,7 @@ public class NameRevCommandTest extends RepositoryTestCase { @Before public void setUp() throws Exception { super.setUp(); - tr = new TestRepository<Repository>(db); + tr = new TestRepository<>(db); git = new Git(db); } |