Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2019-11-20 13:03:34 +0000
committerMichael Keppler2019-12-29 18:07:03 +0000
commit781d1874f60a40cb260426084d2847b5b0c6840f (patch)
tree8c5aaf8625ebbbca2223f2ab8e3cf8ac76c82c08 /org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github
parent4c03807f5f3c7c1e06689e5777f1a3ec101c36b1 (diff)
downloadegit-github-781d1874f60a40cb260426084d2847b5b0c6840f.tar.gz
egit-github-781d1874f60a40cb260426084d2847b5b0c6840f.tar.xz
egit-github-781d1874f60a40cb260426084d2847b5b0c6840f.zip
Remove redundant type arguments
Execute the "Remove redundant type arguments" cleanup on all egit-github projects. Also enable the save action in all project properties for future automated cleanups. Change-Id: Ice37fa348e34677aa24b6e856ef2c6e1a0b160dc Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github')
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitServiceTest.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GistServiceTest.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GollumPayloadTest.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueServiceTest.java8
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LabelServiceTest.java4
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/OrganizationServiceTest.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PagedRequestTest.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PushPayloadTest.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java4
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/CommitTest.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/GistTest.java2
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/IssueTest.java2
13 files changed, 18 insertions, 18 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitServiceTest.java
index 4b0e0ed6..d733d6dd 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitServiceTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/CommitServiceTest.java
@@ -582,7 +582,7 @@ public class CommitServiceTest {
status.setState(CommitStatus.STATE_SUCCESS);
status.setContext("context");
service.createStatus(repo, "123", status);
- Map<String, String> params = new HashMap<String, String>();
+ Map<String, String> params = new HashMap<>();
params.put("description", status.getDescription());
params.put("target_url", status.getTargetUrl());
params.put("state", status.getState());
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java
index d2f5ccab..06e0a9a7 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/DataServiceTest.java
@@ -173,7 +173,7 @@ public class DataServiceTest {
public void createTree() throws IOException {
service.createTree(repo, null);
verify(client).post("/repos/o/n/git/trees",
- new HashMap<Object, Object>(), Tree.class);
+ new HashMap<>(), Tree.class);
}
/**
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GistServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GistServiceTest.java
index b33cfc47..307b4dff 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GistServiceTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GistServiceTest.java
@@ -462,7 +462,7 @@ public class GistServiceTest {
public void createCommentOK() throws IOException {
gistService.createComment("1", "test_comment");
- Map<String, String> params = new HashMap<String, String>(1, 1);
+ Map<String, String> params = new HashMap<>(1, 1);
params.put(IssueService.FIELD_BODY, "test_comment");
verify(gitHubClient).post("/gists/1/comments", params, Comment.class);
}
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GollumPayloadTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GollumPayloadTest.java
index 49910fb4..5a9d4529 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GollumPayloadTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/GollumPayloadTest.java
@@ -42,7 +42,7 @@ public class GollumPayloadTest {
@Test
public void updateFields() {
GollumPayload payload = new GollumPayload();
- List<GollumPage> pages = new ArrayList<GollumPage>();
+ List<GollumPage> pages = new ArrayList<>();
pages.add(new GollumPage().setPageName("page"));
assertEquals(pages, payload.setPages(pages).getPages());
}
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueServiceTest.java
index d63cb29e..0efc15bd 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueServiceTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/IssueServiceTest.java
@@ -481,7 +481,7 @@ public class IssueServiceTest {
issue.setState("test_state");
issueService.editIssue("test_user", "test_repository", issue);
- Map<String, String> params = new HashMap<String, String>();
+ Map<String, String> params = new HashMap<>();
params.put(IssueService.FIELD_TITLE, "test_title");
params.put(IssueService.FIELD_BODY, "test_body");
params.put(IssueService.FILTER_STATE, "test_state");
@@ -504,7 +504,7 @@ public class IssueServiceTest {
RepositoryId id = new RepositoryId("tu", "tr");
issueService.editIssue(id, issue);
- Map<String, String> params = new HashMap<String, String>();
+ Map<String, String> params = new HashMap<>();
params.put(IssueService.FIELD_TITLE, "test_title");
params.put(IssueService.FIELD_BODY, "test_body");
params.put(IssueService.FILTER_STATE, "test_state");
@@ -581,7 +581,7 @@ public class IssueServiceTest {
issueService.createComment("test_user", "test_repository", 1,
"test_comment");
- Map<String, String> params = new HashMap<String, String>();
+ Map<String, String> params = new HashMap<>();
params.put(IssueService.FIELD_BODY, "test_comment");
verify(gitHubClient).post(
"/repos/test_user/test_repository/issues/1/comments", params,
@@ -598,7 +598,7 @@ public class IssueServiceTest {
RepositoryId id = new RepositoryId("tu", "tr");
issueService.createComment(id, 1, "test_comment");
- Map<String, String> params = new HashMap<String, String>();
+ Map<String, String> params = new HashMap<>();
params.put(IssueService.FIELD_BODY, "test_comment");
verify(gitHubClient).post("/repos/tu/tr/issues/1/comments", params,
Comment.class);
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LabelServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LabelServiceTest.java
index ee4b19a9..3f49b004 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LabelServiceTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/LabelServiceTest.java
@@ -189,7 +189,7 @@ public class LabelServiceTest {
*/
@Test
public void setLabels() throws IOException {
- List<Label> labels = new LinkedList<Label>();
+ List<Label> labels = new LinkedList<>();
labelService.setLabels("test_user", "test_repository", "1", labels);
TypeToken<List<Label>> labelsToken = new TypeToken<List<Label>>() {
};
@@ -206,7 +206,7 @@ public class LabelServiceTest {
@Test
public void setLabelsWithRepositoryId() throws IOException {
RepositoryId repo = new RepositoryId("test_user", "test_repository");
- List<Label> labels = new LinkedList<Label>();
+ List<Label> labels = new LinkedList<>();
labelService.setLabels(repo, "1", labels);
TypeToken<List<Label>> labelsToken = new TypeToken<List<Label>>() {
};
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/OrganizationServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/OrganizationServiceTest.java
index 4c163171..7011afad 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/OrganizationServiceTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/OrganizationServiceTest.java
@@ -251,7 +251,7 @@ public class OrganizationServiceTest {
private void testMembersByRole(RoleFilter roleFilter) throws IOException {
service.getMembers("group", roleFilter);
- HashMap<String, String> params = new HashMap<String, String>();
+ HashMap<String, String> params = new HashMap<>();
params.put("role", roleFilter.toString());
GitHubRequest request = new GitHubRequest();
request.setParams(params);
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PagedRequestTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PagedRequestTest.java
index d9409cb4..64177b41 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PagedRequestTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PagedRequestTest.java
@@ -27,7 +27,7 @@ public class PagedRequestTest {
*/
@Test
public void defaultState() {
- PagedRequest<String> request = new PagedRequest<String>();
+ PagedRequest<String> request = new PagedRequest<>();
assertTrue(request.getPage() > 0);
assertTrue(request.getPageSize() > 0);
}
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PushPayloadTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PushPayloadTest.java
index e914b51c..f266f2ab 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PushPayloadTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PushPayloadTest.java
@@ -60,7 +60,7 @@ public class PushPayloadTest {
@Test
public void updateFields() {
PushPayload payload = new PushPayload();
- List<Commit> commits = new ArrayList<Commit>();
+ List<Commit> commits = new ArrayList<>();
commits.add(new Commit().setSha("000"));
assertEquals("head", payload.setHead("head").getHead());
assertEquals("ref", payload.setRef("ref").getRef());
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java
index e5c8fe2a..580e872c 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryServiceTest.java
@@ -139,7 +139,7 @@ public class RepositoryServiceTest {
*/
@Test
public void editRepositoryWithFields() throws IOException {
- Map<String, Object> fields = new HashMap<String, Object>();
+ Map<String, Object> fields = new HashMap<>();
fields.put("has_issues", true);
fields.put("homepage", "test://address");
service.editRepository("o", "n", fields);
@@ -163,7 +163,7 @@ public class RepositoryServiceTest {
*/
@Test
public void editRepositoryProviderWithFields() throws IOException {
- Map<String, Object> fields = new HashMap<String, Object>();
+ Map<String, Object> fields = new HashMap<>();
fields.put("has_issues", true);
fields.put("homepage", "test://address");
service.editRepository(repo, fields);
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/CommitTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/CommitTest.java
index 575a88b7..75194e88 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/CommitTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/CommitTest.java
@@ -47,7 +47,7 @@ public class CommitTest extends LiveTest {
CommitService service = new CommitService(client);
RepositoryId repo = RepositoryId.create("defunkt", "mustache");
PageIterator<RepositoryCommit> commits = service.pageCommits(repo, 2);
- Set<String> shas = new HashSet<String>();
+ Set<String> shas = new HashSet<>();
int pages = 0;
for (Collection<RepositoryCommit> page : commits) {
assertNotNull(page);
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/GistTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/GistTest.java
index 80594083..520a9a9a 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/GistTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/GistTest.java
@@ -171,7 +171,7 @@ public class GistTest extends LiveTest {
Collection<Gist> gists = pages.next();
assertNotNull(gists);
assertTrue(gists.size() > 0);
- Set<String> ids = new HashSet<String>();
+ Set<String> ids = new HashSet<>();
for (Gist gist : gists) {
assertNotNull(gist);
assertNotNull(gist.getId());
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/IssueTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/IssueTest.java
index b55b0606..62a1ec96 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/IssueTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/IssueTest.java
@@ -145,7 +145,7 @@ public class IssueTest extends LiveTest {
@Test
public void testPaging() throws Exception {
IssueService service = new IssueService(client);
- Map<String, String> params = new HashMap<String, String>();
+ Map<String, String> params = new HashMap<>();
params.put(IssueService.FILTER_STATE, IssueService.STATE_CLOSED);
PageIterator<Issue> iterator = service.pageIssues("schacon", "showoff",
params, 1);

Back to the top