Skip to content

Commit 582bd66

Browse files
jminiGabriel Barbier
andcommitted
Applied replacement: Mockito.<Object>any() ==> Mockito.any(Object[].class)
Co-authored-by: Gabriel Barbier <[email protected]>
1 parent 94dd7e0 commit 582bd66

9 files changed

+10
-10
lines changed

src/test/java/org/gitlab4j/api/TestCommitDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void setUp() throws Exception {
3535
response = new MockResponse(Discussion.class, null, "commit-discussions.json");
3636
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3737
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
38-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
38+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3939
}
4040

4141
@Test

src/test/java/org/gitlab4j/api/TestEpicDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setUp() throws Exception {
3434
response = new MockResponse(Discussion.class, null, "epic-discussions.json");
3535
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3636
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
37-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
37+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3838
}
3939

4040
@Test

src/test/java/org/gitlab4j/api/TestExternalStatusCheckApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private void initGetExternalStatusChecks() throws Exception, IOException {
6464
response = new MockResponse(ExternalStatusCheck.class, null, "external-status-checks.json");
6565
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
6666
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
67-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
67+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
6868
}
6969

7070
@Test
@@ -96,6 +96,6 @@ private void initGetExternalStatusCheckStatuses() throws Exception, IOException
9696
response = new MockResponse(ExternalStatusCheckStatus.class, null, "external-status-check-statuses.json");
9797
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
9898
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
99-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
99+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
100100
}
101101
}

src/test/java/org/gitlab4j/api/TestIssueDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setUp() throws Exception {
3434
response = new MockResponse(Discussion.class, null, "issue-discussions.json");
3535
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3636
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
37-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
37+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3838
}
3939

4040
@Test

src/test/java/org/gitlab4j/api/TestMergeRequestDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setUp() throws Exception {
3434
response = new MockResponse(Discussion.class, null, "merge-request-discussions.json");
3535
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3636
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
37-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
37+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3838
}
3939

4040
@Test

src/test/java/org/gitlab4j/api/TestReleaseLinksApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ private void initGetLinks() throws Exception, IOException {
6363
response = new MockResponse(Link.class, null, "links.json");
6464
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
6565
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
66-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
66+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
6767
}
6868
}

src/test/java/org/gitlab4j/api/TestSnippetDiscussionsApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void setUp() throws Exception {
3434
response = new MockResponse(Discussion.class, null, "snippet-discussions.json");
3535
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
3636
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
37-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
37+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
3838
}
3939

4040
@Test

src/test/java/org/gitlab4j/api/TestStreams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void setup() throws Exception {
4848
response = new MockResponse(User.class, null, "user-list.json");
4949
when(gitLabApi.getApiClient()).thenReturn(gitLabApiClient);
5050
when(gitLabApiClient.validateSecretToken(any())).thenReturn(true);
51-
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.<Object>any())).thenReturn(response);
51+
when(gitLabApiClient.get(attributeCaptor.capture(), Mockito.any(Object[].class))).thenReturn(response);
5252
}
5353

5454
@Test

src/test/java/org/gitlab4j/api/TestUnitMergeRequestApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void setUp() throws Exception {
3333
when(mockGitLabApi.getApiClient()).thenReturn(mockedGitLabApiClient);
3434

3535
when(mockedGitLabApiClient.validateSecretToken(any())).thenReturn(true);
36-
when(mockedGitLabApiClient.put(attributeCaptor.capture(), Mockito.<Object>any()))
36+
when(mockedGitLabApiClient.put(attributeCaptor.capture(), Mockito.any(Object[].class)))
3737
.thenReturn(mockedResponse);
3838
}
3939

0 commit comments

Comments
 (0)