From 70dff731c9e5697cac6730202cc042f7c27764b5 Mon Sep 17 00:00:00 2001 From: Henrique Truta Date: Wed, 22 Apr 2020 15:35:54 +0200 Subject: [PATCH 1/3] Use okhttp3 --- pom.xml | 14 +++++++------- .../spotify/github/v3/clients/GitHubClient.java | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 8d4dfdb4..61f38842 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,6 @@ 28.0-jre 3.0.2 - 4.4.0 1.1.1 4.13 1.7.12 @@ -122,12 +121,7 @@ com.squareup.okhttp3 okhttp - ${okhttp.version} - - - com.squareup.okhttp3 - mockwebserver - ${okhttp.version} + 3.14.7 org.slf4j @@ -211,6 +205,12 @@ ${mockito-core.version} test + + com.squareup.okhttp3 + mockwebserver + 3.4.1 + test + org.powermock powermock-module-junit4 diff --git a/src/main/java/com/spotify/github/v3/clients/GitHubClient.java b/src/main/java/com/spotify/github/v3/clients/GitHubClient.java index 9af0b4bd..6f16a071 100644 --- a/src/main/java/com/spotify/github/v3/clients/GitHubClient.java +++ b/src/main/java/com/spotify/github/v3/clients/GitHubClient.java @@ -66,15 +66,15 @@ public class GitHubClient { static final Consumer IGNORE_RESPONSE_CONSUMER = (ignore) -> {}; static final TypeReference> LIST_COMMENT_TYPE_REFERENCE = - new TypeReference>() {}; + new TypeReference<>() {}; static final TypeReference> LIST_COMMIT_TYPE_REFERENCE = - new TypeReference>() {}; + new TypeReference<>() {}; static final TypeReference> LIST_STATUS_TYPE_REFERENCE = - new TypeReference>() {}; + new TypeReference<>() {}; static final TypeReference> LIST_FOLDERCONTENT_TYPE_REFERENCE = - new TypeReference>() {}; + new TypeReference<>() {}; static final TypeReference> LIST_PR_TYPE_REFERENCE = - new TypeReference>() {}; + new TypeReference<>() {}; private static final String GET_ACCESS_TOKEN_URL = "app/installations/%s/access_tokens"; From 62b4f6c9c944b54f39c1c441f316cf66cd75663f Mon Sep 17 00:00:00 2001 From: Henrique Truta Date: Wed, 22 Apr 2020 15:58:05 +0200 Subject: [PATCH 2/3] Change mockwebserver version --- pom.xml | 3 ++- .../java/com/spotify/github/v3/clients/GitHubAuthTest.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 61f38842..9d2fc251 100644 --- a/pom.xml +++ b/pom.xml @@ -122,6 +122,7 @@ com.squareup.okhttp3 okhttp 3.14.7 + compile org.slf4j @@ -208,7 +209,7 @@ com.squareup.okhttp3 mockwebserver - 3.4.1 + 3.14.7 test diff --git a/src/test/java/com/spotify/github/v3/clients/GitHubAuthTest.java b/src/test/java/com/spotify/github/v3/clients/GitHubAuthTest.java index 821ee279..71a210c7 100644 --- a/src/test/java/com/spotify/github/v3/clients/GitHubAuthTest.java +++ b/src/test/java/com/spotify/github/v3/clients/GitHubAuthTest.java @@ -52,7 +52,7 @@ public class GitHubAuthTest { "com/spotify/github/v3/github-private-key")) .getFile()); private URI url; - private MockWebServer mockServer = new MockWebServer(); + private final MockWebServer mockServer = new MockWebServer(); private OkHttpClient client; private ChecksClient checksClient; From 7dd1c46240f6daa10820c00a5460a19901021541 Mon Sep 17 00:00:00 2001 From: Henrique Truta Date: Wed, 22 Apr 2020 16:00:45 +0200 Subject: [PATCH 3/3] Remove redundant scope --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9d2fc251..c0a6efd1 100644 --- a/pom.xml +++ b/pom.xml @@ -122,7 +122,6 @@ com.squareup.okhttp3 okhttp 3.14.7 - compile org.slf4j