diff --git a/CHANGELOG.md b/CHANGELOG.md index b400680da51..fdc4c20b059 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,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..8e063488c57 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,7 @@ import okhttp3.RequestBody; import okhttp3.Response; import okhttp3.ResponseBody; -import okhttp3.internal.Internal; +import okhttp3.internal.connection.RealConnectionPool; import okhttp3.internal.http.HttpMethod; import okio.Buffer; import okio.BufferedSink; @@ -55,7 +55,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; @@ -265,18 +264,9 @@ public void doClose() { // 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(); - } + // Former code to deal with https://github.com/fabric8io/kubernetes-client/issues/4985 + // Not necessary, left here for reference and commenting + RealConnectionPool.Companion.get(connectionPool); } if (executorService != null) { 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 d0cbeb834d2..6e696ec62d8 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 @@ -876,11 +873,6 @@ picocli ${picocli.version} - - com.squareup.okio - okio - ${okio.version} - org.osgi org.osgi.service.component.annotations