[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>
|
||||
<javax.validation.validation-api.version>2.0.1.Final</javax.validation.validation-api.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-core.version>1.2.15</meecrowave-core.version>
|
||||
<meecrowave-maven-plugin.version>1.2.15</meecrowave-maven-plugin.version>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
<properties>
|
||||
<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>
|
||||
<yasson.version>1.0.1</yasson.version>
|
||||
<javax.json.version>1.1.2</javax.json.version>
|
||||
|
|
|
@ -109,9 +109,9 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<okhttp.version>4.12.0</okhttp.version>
|
||||
<okhttp.version>5.0.0-alpha.12</okhttp.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.server.version>9.4.19.v20190610</jetty.server.version>
|
||||
<rxjava2.version>2.2.11</rxjava2.version>
|
||||
|
|
|
@ -52,17 +52,10 @@ public class BinaryFileDownloaderUnitTest {
|
|||
verify(writer).close();
|
||||
}
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void givenUrlAndResponseWithNullBody_whenDownload_thenExpectIllegalStateException() throws Exception {
|
||||
@Test(expected = NullPointerException.class)
|
||||
public void givenUrlAndResponseWithNullBody_whenDownload_thenExpectNullPointerException() throws Exception {
|
||||
String url = "http://example.com/file";
|
||||
Call call = mock(Call.class);
|
||||
when(client.newCall(any(Request.class))).thenReturn(call);
|
||||
Response response = createResponse(url, null);
|
||||
when(call.execute()).thenReturn(response);
|
||||
|
||||
tested.download(url);
|
||||
|
||||
verify(writer, times(0)).write(any(InputStream.class), anyDouble());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
|
|
@ -13,13 +13,11 @@
|
|||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<!-- Dependencies for response decoder with okhttp -->
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>${com.squareup.okhttp3.version}</version>
|
||||
</dependency>
|
||||
<!-- Dependencies for google http client -->
|
||||
<dependency>
|
||||
<groupId>com.google.http-client</groupId>
|
||||
<artifactId>google-http-client</artifactId>
|
||||
|
@ -30,7 +28,6 @@
|
|||
<artifactId>google-http-client-jackson2</artifactId>
|
||||
<version>${googleclient.version}</version>
|
||||
</dependency>
|
||||
<!-- Retrofit -->
|
||||
<dependency>
|
||||
<groupId>com.squareup.retrofit2</groupId>
|
||||
<artifactId>retrofit</artifactId>
|
||||
|
@ -46,7 +43,6 @@
|
|||
<artifactId>adapter-rxjava</artifactId>
|
||||
<version>${retrofit.version}</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.asynchttpclient/async-http-client -->
|
||||
<dependency>
|
||||
<groupId>org.asynchttpclient</groupId>
|
||||
<artifactId>async-http-client</artifactId>
|
||||
|
@ -68,7 +64,6 @@
|
|||
<artifactId>unirest-java</artifactId>
|
||||
<version>${unirest.version}</version>
|
||||
</dependency>
|
||||
<!-- javalin -->
|
||||
<dependency>
|
||||
<groupId>io.javalin</groupId>
|
||||
<artifactId>javalin</artifactId>
|
||||
|
@ -105,7 +100,7 @@
|
|||
<properties>
|
||||
<gson.version>2.10.1</gson.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>
|
||||
<async.http.client.version>2.2.0</async.http.client.version>
|
||||
<retrofit.version>2.3.0</retrofit.version>
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
</build>
|
||||
|
||||
<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>
|
||||
<osgi.version>6.0.0</osgi.version>
|
||||
<maven-bundle-plugin.version>3.3.0</maven-bundle-plugin.version>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<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.springframework.boot</groupId>
|
||||
|
@ -125,6 +125,7 @@
|
|||
<reactor.version>3.4.5</reactor.version>
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
<testcontainers-mongodb.version>1.16.2</testcontainers-mongodb.version>
|
||||
<mockwebserver.version>5.0.0-alpha.12</mockwebserver.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -75,7 +75,12 @@
|
|||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<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>
|
||||
</dependencies>
|
||||
|
||||
|
@ -88,4 +93,9 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<mockwebserver.version>5.0.0-alpha.12</mockwebserver.version>
|
||||
<kotlin-stdlib.version>2.0.0-Beta4</kotlin-stdlib.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -67,7 +67,12 @@
|
|||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<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>
|
||||
</dependencies>
|
||||
|
||||
|
@ -86,6 +91,8 @@
|
|||
<properties>
|
||||
<reactor-spring.version>1.0.1.RELEASE</reactor-spring.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>
|
||||
|
||||
</project>
|
|
@ -125,6 +125,11 @@
|
|||
<version>${jetty-reactive-httpclient.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<version>${kotlin-stdlib.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -179,10 +184,11 @@
|
|||
<reactor-spring.version>1.0.1.RELEASE</reactor-spring.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>
|
||||
<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>
|
||||
<wiremock-standalone.version>2.26.0</wiremock-standalone.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>
|
||||
|
||||
</project>
|
|
@ -76,8 +76,8 @@
|
|||
<rest-assured.version>3.1.1</rest-assured.version>
|
||||
<application.class>com.baeldung.jooby.App</application.class>
|
||||
<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>
|
||||
<squareup.okhttp.version>4.12.0</squareup.okhttp.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
Loading…
Reference in New Issue