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.test/tst/org | |
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.test/tst/org')
5 files changed, 11 insertions, 11 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java index 822df7175f..ab6dc35f79 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java @@ -213,7 +213,7 @@ public class DumbClientDumbServerTest extends HttpTestCase { @Test public void testInitialClone_Packed() throws Exception { - new TestRepository<Repository>(remoteRepository).packAndPrune(); + new TestRepository<>(remoteRepository).packAndPrune(); Repository dst = createBareRepository(); assertFalse(dst.hasObject(A_txt)); diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java index ab4ac131ef..06bfd7988b 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java @@ -241,7 +241,7 @@ public class DumbClientSmartServerTest extends HttpTestCase { @Test public void testInitialClone_Packed() throws Exception { - new TestRepository<Repository>(remoteRepository).packAndPrune(); + new TestRepository<>(remoteRepository).packAndPrune(); Repository dst = createBareRepository(); assertFalse(dst.hasObject(A_txt)); diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java index 7c6d591513..82e79b8e50 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java @@ -83,7 +83,7 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase { private static void assertUnreasonable(String name) throws ServiceNotEnabledException { - FileResolver<RepositoryResolver> r = new FileResolver<RepositoryResolver>( + FileResolver<RepositoryResolver> r = new FileResolver<>( new File("."), false); try { r.open(null, name); @@ -103,7 +103,7 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase { FileResolver<RepositoryResolver> resolver; assertFalse("no git-daemon-export-ok", export.exists()); - resolver = new FileResolver<RepositoryResolver>(base, false /* + resolver = new FileResolver<>(base, false /* * require * flag */); @@ -114,7 +114,7 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase { assertEquals("Service not enabled", e.getMessage()); } - resolver = new FileResolver<RepositoryResolver>(base, true /* + resolver = new FileResolver<>(base, true /* * export * all */); @@ -125,7 +125,7 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase { } FileUtils.createNewFile(export); - resolver = new FileResolver<RepositoryResolver>(base, false /* + resolver = new FileResolver<>(base, false /* * require * flag */); @@ -142,7 +142,7 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase { final Repository a = createBareRepository(); final String name = a.getDirectory().getName() + "-not-a-git"; final File base = a.getDirectory().getParentFile(); - FileResolver<RepositoryResolver> resolver = new FileResolver<RepositoryResolver>( + FileResolver<RepositoryResolver> resolver = new FileResolver<>( base, false); try { diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java index 0a68ed2617..ef8daec31f 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java @@ -112,7 +112,7 @@ public class SetAdditionalHeadersTest extends HttpTestCase { assertTrue("isa TransportHttp", t instanceof TransportHttp); assertTrue("isa HttpTransport", t instanceof HttpTransport); - HashMap<String, String> headers = new HashMap<String, String>(); + HashMap<String, String> headers = new HashMap<>(); headers.put("Cookie", "someTokenValue=23gBog34"); headers.put("AnotherKey", "someValue"); ((TransportHttp) t).setAdditionalHeaders(headers); diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java index f887da4c77..ed223c96ef 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java @@ -437,7 +437,7 @@ public class SmartClientSmartServerTest extends HttpTestCase { // Create a new commit on the remote. // - b = new TestRepository<Repository>(remoteRepository).branch(master); + b = new TestRepository<>(remoteRepository).branch(master); RevCommit Z = b.commit().message("Z").create(); // Now incrementally update. @@ -497,7 +497,7 @@ public class SmartClientSmartServerTest extends HttpTestCase { // Create a new commit on the remote. // - b = new TestRepository<Repository>(remoteRepository).branch(master); + b = new TestRepository<>(remoteRepository).branch(master); RevCommit Z = b.commit().message("Z").create(); // Now incrementally update. @@ -614,7 +614,7 @@ public class SmartClientSmartServerTest extends HttpTestCase { final String repoName = "refs-unreadable"; RefsUnreadableInMemoryRepository badRefsRepo = new RefsUnreadableInMemoryRepository( new DfsRepositoryDescription(repoName)); - final TestRepository<Repository> repo = new TestRepository<Repository>( + final TestRepository<Repository> repo = new TestRepository<>( badRefsRepo); ServletContextHandler app = noRefServer.addContext("/git"); |