[JAVA-31566] Upgrade okhttp to latest version (#15983)
This commit is contained in:
parent
4f0a8ce5d9
commit
95a8bbe3f2
|
@ -191,7 +191,7 @@
|
||||||
<bval.version>2.0.6</bval.version>
|
<bval.version>2.0.6</bval.version>
|
||||||
<javax.validation.validation-api.version>2.0.1.Final</javax.validation.validation-api.version>
|
<javax.validation.validation-api.version>2.0.1.Final</javax.validation.validation-api.version>
|
||||||
<meecrowave-junit.version>1.2.15</meecrowave-junit.version>
|
<meecrowave-junit.version>1.2.15</meecrowave-junit.version>
|
||||||
<okhttp.version>4.12.0</okhttp.version>
|
<okhttp.version>5.0.0-alpha.12</okhttp.version>
|
||||||
<meecrowave-jpa.version>1.2.15</meecrowave-jpa.version>
|
<meecrowave-jpa.version>1.2.15</meecrowave-jpa.version>
|
||||||
<meecrowave-core.version>1.2.15</meecrowave-core.version>
|
<meecrowave-core.version>1.2.15</meecrowave-core.version>
|
||||||
<meecrowave-maven-plugin.version>1.2.15</meecrowave-maven-plugin.version>
|
<meecrowave-maven-plugin.version>1.2.15</meecrowave-maven-plugin.version>
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<exchange-rate-api.version>1.0.0-SNAPSHOT</exchange-rate-api.version>
|
<exchange-rate-api.version>1.0.0-SNAPSHOT</exchange-rate-api.version>
|
||||||
<okhttp.version>4.12.0</okhttp.version>
|
<okhttp.version>5.0.0-alpha.12</okhttp.version>
|
||||||
<javax.json.bind-api.version>1.0</javax.json.bind-api.version>
|
<javax.json.bind-api.version>1.0</javax.json.bind-api.version>
|
||||||
<yasson.version>1.0.1</yasson.version>
|
<yasson.version>1.0.1</yasson.version>
|
||||||
<javax.json.version>1.1.2</javax.json.version>
|
<javax.json.version>1.1.2</javax.json.version>
|
||||||
|
|
|
@ -109,9 +109,9 @@
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<okhttp.version>4.12.0</okhttp.version>
|
<okhttp.version>5.0.0-alpha.12</okhttp.version>
|
||||||
<gson.version>2.10.1</gson.version>
|
<gson.version>2.10.1</gson.version>
|
||||||
<mockwebserver.version>4.9.1</mockwebserver.version>
|
<mockwebserver.version>5.0.0-alpha.12</mockwebserver.version>
|
||||||
<jetty.httpclient.version>1.0.3</jetty.httpclient.version>
|
<jetty.httpclient.version>1.0.3</jetty.httpclient.version>
|
||||||
<jetty.server.version>9.4.19.v20190610</jetty.server.version>
|
<jetty.server.version>9.4.19.v20190610</jetty.server.version>
|
||||||
<rxjava2.version>2.2.11</rxjava2.version>
|
<rxjava2.version>2.2.11</rxjava2.version>
|
||||||
|
|
|
@ -52,17 +52,10 @@ public class BinaryFileDownloaderUnitTest {
|
||||||
verify(writer).close();
|
verify(writer).close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalStateException.class)
|
@Test(expected = NullPointerException.class)
|
||||||
public void givenUrlAndResponseWithNullBody_whenDownload_thenExpectIllegalStateException() throws Exception {
|
public void givenUrlAndResponseWithNullBody_whenDownload_thenExpectNullPointerException() throws Exception {
|
||||||
String url = "http://example.com/file";
|
String url = "http://example.com/file";
|
||||||
Call call = mock(Call.class);
|
|
||||||
when(client.newCall(any(Request.class))).thenReturn(call);
|
|
||||||
Response response = createResponse(url, null);
|
Response response = createResponse(url, null);
|
||||||
when(call.execute()).thenReturn(response);
|
|
||||||
|
|
||||||
tested.download(url);
|
|
||||||
|
|
||||||
verify(writer, times(0)).write(any(InputStream.class), anyDouble());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
|
@ -13,13 +13,11 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Dependencies for response decoder with okhttp -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
<artifactId>okhttp</artifactId>
|
<artifactId>okhttp</artifactId>
|
||||||
<version>${com.squareup.okhttp3.version}</version>
|
<version>${com.squareup.okhttp3.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Dependencies for google http client -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.http-client</groupId>
|
<groupId>com.google.http-client</groupId>
|
||||||
<artifactId>google-http-client</artifactId>
|
<artifactId>google-http-client</artifactId>
|
||||||
|
@ -30,7 +28,6 @@
|
||||||
<artifactId>google-http-client-jackson2</artifactId>
|
<artifactId>google-http-client-jackson2</artifactId>
|
||||||
<version>${googleclient.version}</version>
|
<version>${googleclient.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Retrofit -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.retrofit2</groupId>
|
<groupId>com.squareup.retrofit2</groupId>
|
||||||
<artifactId>retrofit</artifactId>
|
<artifactId>retrofit</artifactId>
|
||||||
|
@ -46,7 +43,6 @@
|
||||||
<artifactId>adapter-rxjava</artifactId>
|
<artifactId>adapter-rxjava</artifactId>
|
||||||
<version>${retrofit.version}</version>
|
<version>${retrofit.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/org.asynchttpclient/async-http-client -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.asynchttpclient</groupId>
|
<groupId>org.asynchttpclient</groupId>
|
||||||
<artifactId>async-http-client</artifactId>
|
<artifactId>async-http-client</artifactId>
|
||||||
|
@ -68,7 +64,6 @@
|
||||||
<artifactId>unirest-java</artifactId>
|
<artifactId>unirest-java</artifactId>
|
||||||
<version>${unirest.version}</version>
|
<version>${unirest.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- javalin -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.javalin</groupId>
|
<groupId>io.javalin</groupId>
|
||||||
<artifactId>javalin</artifactId>
|
<artifactId>javalin</artifactId>
|
||||||
|
@ -105,7 +100,7 @@
|
||||||
<properties>
|
<properties>
|
||||||
<gson.version>2.10.1</gson.version>
|
<gson.version>2.10.1</gson.version>
|
||||||
<httpclient.version>4.5.3</httpclient.version>
|
<httpclient.version>4.5.3</httpclient.version>
|
||||||
<com.squareup.okhttp3.version>4.12.0</com.squareup.okhttp3.version>
|
<com.squareup.okhttp3.version>5.0.0-alpha.12</com.squareup.okhttp3.version>
|
||||||
<googleclient.version>1.23.0</googleclient.version>
|
<googleclient.version>1.23.0</googleclient.version>
|
||||||
<async.http.client.version>2.2.0</async.http.client.version>
|
<async.http.client.version>2.2.0</async.http.client.version>
|
||||||
<retrofit.version>2.3.0</retrofit.version>
|
<retrofit.version>2.3.0</retrofit.version>
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<okhttp.version>4.12.0</okhttp.version>
|
<okhttp.version>5.0.0-alpha.12</okhttp.version>
|
||||||
<javax.json.version>1.1</javax.json.version>
|
<javax.json.version>1.1</javax.json.version>
|
||||||
<osgi.version>6.0.0</osgi.version>
|
<osgi.version>6.0.0</osgi.version>
|
||||||
<maven-bundle-plugin.version>3.3.0</maven-bundle-plugin.version>
|
<maven-bundle-plugin.version>3.3.0</maven-bundle-plugin.version>
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
<artifactId>mockwebserver</artifactId>
|
<artifactId>mockwebserver</artifactId>
|
||||||
<version>4.12.0</version> <!-- this can be removed when we migrate spring-boot-dependencies to the latest version -->
|
<version>${mockwebserver.version}</version> <!-- this can be removed when we migrate spring-boot-dependencies to the latest version -->
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
@ -125,6 +125,7 @@
|
||||||
<reactor.version>3.4.5</reactor.version>
|
<reactor.version>3.4.5</reactor.version>
|
||||||
<caffeine.version>3.1.8</caffeine.version>
|
<caffeine.version>3.1.8</caffeine.version>
|
||||||
<testcontainers-mongodb.version>1.16.2</testcontainers-mongodb.version>
|
<testcontainers-mongodb.version>1.16.2</testcontainers-mongodb.version>
|
||||||
|
<mockwebserver.version>5.0.0-alpha.12</mockwebserver.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -75,7 +75,12 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
<artifactId>mockwebserver</artifactId>
|
<artifactId>mockwebserver</artifactId>
|
||||||
<version>4.12.0</version> <!-- this can be removed when we migrate spring-boot-dependencies to the latest version -->
|
<version>${mockwebserver.version}</version> <!-- this can be removed when we migrate spring-boot-dependencies to the latest version -->
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
|
<version>${kotlin-stdlib.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -88,4 +93,9 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<mockwebserver.version>5.0.0-alpha.12</mockwebserver.version>
|
||||||
|
<kotlin-stdlib.version>2.0.0-Beta4</kotlin-stdlib.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -67,7 +67,12 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
<artifactId>mockwebserver</artifactId>
|
<artifactId>mockwebserver</artifactId>
|
||||||
<version>4.12.0</version>
|
<version>${mockwebserver.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
|
<version>${kotlin-stdlib.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -86,6 +91,8 @@
|
||||||
<properties>
|
<properties>
|
||||||
<reactor-spring.version>1.0.1.RELEASE</reactor-spring.version>
|
<reactor-spring.version>1.0.1.RELEASE</reactor-spring.version>
|
||||||
<spring-cloud.version>2021.0.4</spring-cloud.version>
|
<spring-cloud.version>2021.0.4</spring-cloud.version>
|
||||||
|
<mockwebserver.version>5.0.0-alpha.12</mockwebserver.version>
|
||||||
|
<kotlin-stdlib.version>2.0.0-Beta4</kotlin-stdlib.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -125,6 +125,11 @@
|
||||||
<version>${jetty-reactive-httpclient.version}</version>
|
<version>${jetty-reactive-httpclient.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
|
<version>${kotlin-stdlib.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -179,10 +184,11 @@
|
||||||
<reactor-spring.version>1.0.1.RELEASE</reactor-spring.version>
|
<reactor-spring.version>1.0.1.RELEASE</reactor-spring.version>
|
||||||
<geronimo-json_1.1_spec.version>1.0</geronimo-json_1.1_spec.version>
|
<geronimo-json_1.1_spec.version>1.0</geronimo-json_1.1_spec.version>
|
||||||
<jetty-reactive-httpclient.version>1.1.6</jetty-reactive-httpclient.version>
|
<jetty-reactive-httpclient.version>1.1.6</jetty-reactive-httpclient.version>
|
||||||
<okhttp.version>4.12.0</okhttp.version>
|
<okhttp.version>5.0.0-alpha.12</okhttp.version>
|
||||||
<reactor-test.version>3.5.3</reactor-test.version>
|
<reactor-test.version>3.5.3</reactor-test.version>
|
||||||
<wiremock-standalone.version>2.26.0</wiremock-standalone.version>
|
<wiremock-standalone.version>2.26.0</wiremock-standalone.version>
|
||||||
<spring-cloud-starter-openfeign.version>3.1.4</spring-cloud-starter-openfeign.version>
|
<spring-cloud-starter-openfeign.version>3.1.4</spring-cloud-starter-openfeign.version>
|
||||||
|
<kotlin-stdlib.version>2.0.0-Beta4</kotlin-stdlib.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -76,8 +76,8 @@
|
||||||
<rest-assured.version>3.1.1</rest-assured.version>
|
<rest-assured.version>3.1.1</rest-assured.version>
|
||||||
<application.class>com.baeldung.jooby.App</application.class>
|
<application.class>com.baeldung.jooby.App</application.class>
|
||||||
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
|
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
|
||||||
|
<squareup.okhttp.version>5.0.0-alpha.12</squareup.okhttp.version>
|
||||||
<maven-compiler.version>3.12.1</maven-compiler.version>
|
<maven-compiler.version>3.12.1</maven-compiler.version>
|
||||||
<squareup.okhttp.version>4.12.0</squareup.okhttp.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
Loading…
Reference in New Issue