From 3e9735c70ded703ec2061f5239abf23ac1aa7a8c Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Fri, 11 Oct 2024 15:18:23 +0200 Subject: [PATCH] feat:deps: bumped OkHttp from 3.12.12 to 4.12.0 Signed-off-by: Marc Nuri --- CHANGELOG.md | 3 ++- .../client/okhttp/OkHttpClientImpl.java | 19 +------------------ .../features/src/main/resources/feature.xml | 8 +++----- pom.xml | 10 +--------- 4 files changed, 7 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d68f5570257..24a322febc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,8 +17,9 @@ * Fix #5480: Move `io.fabric8:zjsonpatch` to KubernetesClient project #### Dependency Upgrade -* Fix #6052: Removed dependency on no longer maintained com.github.mifmif:generex +* Fix #2632: Bumped OkHttp from 3.12.12 to 4.12.0 * Fix #5965: Bumped sundrio.version from 0.103.1 to 0.200.0 +* Fix #6052: Removed dependency on no longer maintained com.github.mifmif:generex #### New Features * Fix #6150: Config uses `proxy-url` in kubeconfig's cluster configuration diff --git a/httpclient-okhttp/src/main/java/io/fabric8/kubernetes/client/okhttp/OkHttpClientImpl.java b/httpclient-okhttp/src/main/java/io/fabric8/kubernetes/client/okhttp/OkHttpClientImpl.java index a267630893d..4ec5ce829e5 100644 --- a/httpclient-okhttp/src/main/java/io/fabric8/kubernetes/client/okhttp/OkHttpClientImpl.java +++ b/httpclient-okhttp/src/main/java/io/fabric8/kubernetes/client/okhttp/OkHttpClientImpl.java @@ -41,7 +41,6 @@ import okhttp3.RequestBody; import okhttp3.Response; import okhttp3.ResponseBody; -import okhttp3.internal.Internal; import okhttp3.internal.http.HttpMethod; import okio.Buffer; import okio.BufferedSink; @@ -55,7 +54,6 @@ import java.io.IOException; import java.io.InterruptedIOException; import java.io.Reader; -import java.lang.reflect.Method; import java.net.MalformedURLException; import java.nio.ByteBuffer; import java.util.Collections; @@ -262,21 +260,6 @@ public void doClose() { if (connectionPool != null) { connectionPool.evictAll(); - - // begin hack to terminate the idle task, which is not necessary after 4.3.0 - https://github.com/square/okhttp/commit/bc3ad111ad01100a77846f7dc433b0c0f5b58dba - // to immediately clean it up, we need to notify the thread waiting on the ConnectionPool / RealConnectionPool - Object realConnectionPool = connectionPool; - - try { - // 3.14+ holds a delegate to the real pool - Method method = Internal.class.getMethod("realConnectionPool", ConnectionPool.class); - realConnectionPool = method.invoke(Internal.instance, connectionPool); - } catch (Exception e) { - // could be 3.12 - } - synchronized (realConnectionPool) { - realConnectionPool.notifyAll(); - } } if (executorService != null) { @@ -306,7 +289,7 @@ private CompletableFuture> sendAsync(StandardHttpRequest call.enqueue(new Callback() { @Override - public void onResponse(Call call, Response response) throws IOException { + public void onResponse(Call call, Response response) { BufferedSource source = response.body().source(); AsyncBody asyncBody = handler.apply(source); diff --git a/platforms/karaf/features/src/main/resources/feature.xml b/platforms/karaf/features/src/main/resources/feature.xml index a92c3c8875d..88a5ad0cac5 100644 --- a/platforms/karaf/features/src/main/resources/feature.xml +++ b/platforms/karaf/features/src/main/resources/feature.xml @@ -31,17 +31,15 @@ mvn:org.snakeyaml/snakeyaml-engine/${snakeyaml.version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.automaton/${automaton.bundle.version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.conscrypt-openjdk/${conscrypt-openjdk-uber.bundle.version} - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/${okhttp.bundle.version} - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okio/${okio.bundle.version} mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/${aries-spifly.bundle.version} mvn:org.ow2.asm/asm/${asm.bundle.version} mvn:org.ow2.asm/asm-analysis/${asm.bundle.version} mvn:org.ow2.asm/asm-commons/${asm.bundle.version} mvn:org.ow2.asm/asm-tree/${asm.bundle.version} mvn:org.ow2.asm/asm-util/${asm.bundle.version} - mvn:io.fabric8/kubernetes-model-common/${project.version} - mvn:io.fabric8/zjsonpatch/${project.version} + mvn:io.fabric8/zjsonpatch/${project.version} + mvn:io.fabric8/kubernetes-model-common/${project.version} mvn:io.fabric8/kubernetes-model-core/${project.version} mvn:io.fabric8/kubernetes-model-rbac/${project.version} mvn:io.fabric8/kubernetes-model-admissionregistration/${project.version} @@ -64,7 +62,7 @@ mvn:io.fabric8/kubernetes-model-storageclass/${project.version} mvn:io.fabric8/kubernetes-model-resource/${project.version} mvn:io.fabric8/openshift-model/${project.version} - mvn:io.fabric8/kubernetes-httpclient-okhttp/${project.version}/jar/bundle + mvn:io.fabric8/kubernetes-httpclient-jdk/${project.version}/jar/bundle mvn:io.fabric8/kubernetes-client/${project.version}/jar/bundle diff --git a/pom.xml b/pom.xml index 6acea8a0eb4..31178dfbd16 100644 --- a/pom.xml +++ b/pom.xml @@ -91,10 +91,7 @@ 0.200.0 - 3.12.12 - 3.12.1_1 - 1.17.6 - 1.15.0_1 + 4.12.0 2.18.0 11.0.24 3.9.9 @@ -872,11 +869,6 @@ picocli ${picocli.version} - - com.squareup.okio - okio - ${okio.version} - org.osgi org.osgi.service.component.annotations