Skip to content

Commit 4f04b8d

Browse files
Use okhttp3 instead of 4 (spotify#5)
* Use okhttp3 * Change mockwebserver version
1 parent a1e17b2 commit 4f04b8d

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
<!-- versions -->
8585
<guava.version>28.0-jre</guava.version>
8686
<jsr305.version>3.0.2</jsr305.version>
87-
<okhttp.version>4.4.0</okhttp.version>
8887
<jsr311-api.version>1.1.1</jsr311-api.version>
8988
<junit.version>4.13</junit.version>
9089
<slf4j-api.version>1.7.12</slf4j-api.version>
@@ -122,12 +121,7 @@
122121
<dependency>
123122
<groupId>com.squareup.okhttp3</groupId>
124123
<artifactId>okhttp</artifactId>
125-
<version>${okhttp.version}</version>
126-
</dependency>
127-
<dependency>
128-
<groupId>com.squareup.okhttp3</groupId>
129-
<artifactId>mockwebserver</artifactId>
130-
<version>${okhttp.version}</version>
124+
<version>3.14.7</version>
131125
</dependency>
132126
<dependency>
133127
<groupId>org.slf4j</groupId>
@@ -211,6 +205,12 @@
211205
<version>${mockito-core.version}</version>
212206
<scope>test</scope>
213207
</dependency>
208+
<dependency>
209+
<groupId>com.squareup.okhttp3</groupId>
210+
<artifactId>mockwebserver</artifactId>
211+
<version>3.14.7</version>
212+
<scope>test</scope>
213+
</dependency>
214214
<dependency>
215215
<groupId>org.powermock</groupId>
216216
<artifactId>powermock-module-junit4</artifactId>

src/main/java/com/spotify/github/v3/clients/GitHubClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ public class GitHubClient {
6666

6767
static final Consumer<Response> IGNORE_RESPONSE_CONSUMER = (ignore) -> {};
6868
static final TypeReference<List<Comment>> LIST_COMMENT_TYPE_REFERENCE =
69-
new TypeReference<List<Comment>>() {};
69+
new TypeReference<>() {};
7070
static final TypeReference<List<CommitItem>> LIST_COMMIT_TYPE_REFERENCE =
71-
new TypeReference<List<CommitItem>>() {};
71+
new TypeReference<>() {};
7272
static final TypeReference<List<Status>> LIST_STATUS_TYPE_REFERENCE =
73-
new TypeReference<List<Status>>() {};
73+
new TypeReference<>() {};
7474
static final TypeReference<List<FolderContent>> LIST_FOLDERCONTENT_TYPE_REFERENCE =
75-
new TypeReference<List<FolderContent>>() {};
75+
new TypeReference<>() {};
7676
static final TypeReference<List<PullRequestItem>> LIST_PR_TYPE_REFERENCE =
77-
new TypeReference<List<PullRequestItem>>() {};
77+
new TypeReference<>() {};
7878

7979
private static final String GET_ACCESS_TOKEN_URL = "app/installations/%s/access_tokens";
8080

src/test/java/com/spotify/github/v3/clients/GitHubAuthTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class GitHubAuthTest {
5252
"com/spotify/github/v3/github-private-key"))
5353
.getFile());
5454
private URI url;
55-
private MockWebServer mockServer = new MockWebServer();
55+
private final MockWebServer mockServer = new MockWebServer();
5656
private OkHttpClient client;
5757
private ChecksClient checksClient;
5858

0 commit comments

Comments
 (0)