From 95a8bbe3f27e60384401c08bf00664da1ac1417f Mon Sep 17 00:00:00 2001
From: panos-kakos <102670093+panos-kakos@users.noreply.github.com>
Date: Mon, 4 Mar 2024 09:39:28 +0200
Subject: [PATCH] [JAVA-31566] Upgrade okhttp to latest version (#15983)
---
apache-libraries/pom.xml | 2 +-
.../java-spi/exchange-rate-impl/pom.xml | 2 +-
libraries-http-2/pom.xml | 4 ++--
.../download/BinaryFileDownloaderUnitTest.java | 11 ++---------
libraries-http/pom.xml | 7 +------
osgi/pom.xml | 2 +-
spring-5-webflux-2/pom.xml | 3 ++-
spring-5-webflux/pom.xml | 12 +++++++++++-
spring-reactive-modules/spring-reactive-3/pom.xml | 9 ++++++++-
.../spring-reactive-client/pom.xml | 8 +++++++-
web-modules/jooby/pom.xml | 2 +-
11 files changed, 37 insertions(+), 25 deletions(-)
diff --git a/apache-libraries/pom.xml b/apache-libraries/pom.xml
index 02e9f08a8d..41432be107 100644
--- a/apache-libraries/pom.xml
+++ b/apache-libraries/pom.xml
@@ -191,7 +191,7 @@
2.0.6
2.0.1.Final
1.2.15
- 4.12.0
+ 5.0.0-alpha.12
1.2.15
1.2.15
1.2.15
diff --git a/core-java-modules/java-spi/exchange-rate-impl/pom.xml b/core-java-modules/java-spi/exchange-rate-impl/pom.xml
index 7885d876a0..7824bbc9e5 100644
--- a/core-java-modules/java-spi/exchange-rate-impl/pom.xml
+++ b/core-java-modules/java-spi/exchange-rate-impl/pom.xml
@@ -66,7 +66,7 @@
1.0.0-SNAPSHOT
- 4.12.0
+ 5.0.0-alpha.12
1.0
1.0.1
1.1.2
diff --git a/libraries-http-2/pom.xml b/libraries-http-2/pom.xml
index 5e803cde8a..934e0d2900 100644
--- a/libraries-http-2/pom.xml
+++ b/libraries-http-2/pom.xml
@@ -109,9 +109,9 @@
- 4.12.0
+ 5.0.0-alpha.12
2.10.1
- 4.9.1
+ 5.0.0-alpha.12
1.0.3
9.4.19.v20190610
2.2.11
diff --git a/libraries-http-2/src/test/java/com/baeldung/okhttp/download/BinaryFileDownloaderUnitTest.java b/libraries-http-2/src/test/java/com/baeldung/okhttp/download/BinaryFileDownloaderUnitTest.java
index 15dda3a471..e204a5553d 100644
--- a/libraries-http-2/src/test/java/com/baeldung/okhttp/download/BinaryFileDownloaderUnitTest.java
+++ b/libraries-http-2/src/test/java/com/baeldung/okhttp/download/BinaryFileDownloaderUnitTest.java
@@ -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
diff --git a/libraries-http/pom.xml b/libraries-http/pom.xml
index caf42639cc..1e988a91e3 100644
--- a/libraries-http/pom.xml
+++ b/libraries-http/pom.xml
@@ -13,13 +13,11 @@
-
com.squareup.okhttp3
okhttp
${com.squareup.okhttp3.version}
-
com.google.http-client
google-http-client
@@ -30,7 +28,6 @@
google-http-client-jackson2
${googleclient.version}
-
com.squareup.retrofit2
retrofit
@@ -46,7 +43,6 @@
adapter-rxjava
${retrofit.version}
-
org.asynchttpclient
async-http-client
@@ -68,7 +64,6 @@
unirest-java
${unirest.version}
-
io.javalin
javalin
@@ -105,7 +100,7 @@
2.10.1
4.5.3
- 4.12.0
+ 5.0.0-alpha.12
1.23.0
2.2.0
2.3.0
diff --git a/osgi/pom.xml b/osgi/pom.xml
index 238f50293b..da856095c0 100644
--- a/osgi/pom.xml
+++ b/osgi/pom.xml
@@ -90,7 +90,7 @@
- 4.12.0
+ 5.0.0-alpha.12
1.1
6.0.0
3.3.0
diff --git a/spring-5-webflux-2/pom.xml b/spring-5-webflux-2/pom.xml
index 5422ed55c4..38cbbc8bf0 100644
--- a/spring-5-webflux-2/pom.xml
+++ b/spring-5-webflux-2/pom.xml
@@ -86,7 +86,7 @@
com.squareup.okhttp3
mockwebserver
- 4.12.0
+ ${mockwebserver.version}
org.springframework.boot
@@ -125,6 +125,7 @@
3.4.5
3.1.8
1.16.2
+ 5.0.0-alpha.12
\ No newline at end of file
diff --git a/spring-5-webflux/pom.xml b/spring-5-webflux/pom.xml
index 8a381b250a..62a463a5cd 100644
--- a/spring-5-webflux/pom.xml
+++ b/spring-5-webflux/pom.xml
@@ -75,7 +75,12 @@
com.squareup.okhttp3
mockwebserver
- 4.12.0
+ ${mockwebserver.version}
+
+
+ org.jetbrains.kotlin
+ kotlin-stdlib
+ ${kotlin-stdlib.version}
@@ -88,4 +93,9 @@
+
+ 5.0.0-alpha.12
+ 2.0.0-Beta4
+
+
\ No newline at end of file
diff --git a/spring-reactive-modules/spring-reactive-3/pom.xml b/spring-reactive-modules/spring-reactive-3/pom.xml
index 45dd25794e..15cf80fda1 100644
--- a/spring-reactive-modules/spring-reactive-3/pom.xml
+++ b/spring-reactive-modules/spring-reactive-3/pom.xml
@@ -67,7 +67,12 @@
com.squareup.okhttp3
mockwebserver
- 4.12.0
+ ${mockwebserver.version}
+
+
+ org.jetbrains.kotlin
+ kotlin-stdlib
+ ${kotlin-stdlib.version}
@@ -86,6 +91,8 @@
1.0.1.RELEASE
2021.0.4
+ 5.0.0-alpha.12
+ 2.0.0-Beta4
\ No newline at end of file
diff --git a/spring-reactive-modules/spring-reactive-client/pom.xml b/spring-reactive-modules/spring-reactive-client/pom.xml
index 634fef1273..797529b980 100644
--- a/spring-reactive-modules/spring-reactive-client/pom.xml
+++ b/spring-reactive-modules/spring-reactive-client/pom.xml
@@ -125,6 +125,11 @@
${jetty-reactive-httpclient.version}
test
+
+ org.jetbrains.kotlin
+ kotlin-stdlib
+ ${kotlin-stdlib.version}
+
@@ -179,10 +184,11 @@
1.0.1.RELEASE
1.0
1.1.6
- 4.12.0
+ 5.0.0-alpha.12
3.5.3
2.26.0
3.1.4
+ 2.0.0-Beta4
\ No newline at end of file
diff --git a/web-modules/jooby/pom.xml b/web-modules/jooby/pom.xml
index 5e64e375f5..c298ea8729 100644
--- a/web-modules/jooby/pom.xml
+++ b/web-modules/jooby/pom.xml
@@ -76,8 +76,8 @@
3.1.1
com.baeldung.jooby.App
3.2.4
+ 5.0.0-alpha.12
3.12.1
- 4.12.0
\ No newline at end of file