Skip to content

Commit

Permalink
feat:deps: bumped OkHttp from 3.12.12 to 4.12.0
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Oct 21, 2024
1 parent 09b7765 commit 3e9735c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 33 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -306,7 +289,7 @@ private CompletableFuture<HttpResponse<AsyncBody>> 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);
Expand Down
8 changes: 3 additions & 5 deletions platforms/karaf/features/src/main/resources/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@
<bundle dependency='true'>mvn:org.snakeyaml/snakeyaml-engine/${snakeyaml.version}</bundle>
<bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.automaton/${automaton.bundle.version}</bundle>
<bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.conscrypt-openjdk/${conscrypt-openjdk-uber.bundle.version}</bundle>
<bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/${okhttp.bundle.version}</bundle>
<bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okio/${okio.bundle.version}</bundle>
<bundle dependency='true'>mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/${aries-spifly.bundle.version}</bundle>
<bundle dependency='true'>mvn:org.ow2.asm/asm/${asm.bundle.version}</bundle>
<bundle dependency='true'>mvn:org.ow2.asm/asm-analysis/${asm.bundle.version}</bundle>
<bundle dependency='true'>mvn:org.ow2.asm/asm-commons/${asm.bundle.version}</bundle>
<bundle dependency='true'>mvn:org.ow2.asm/asm-tree/${asm.bundle.version}</bundle>
<bundle dependency='true'>mvn:org.ow2.asm/asm-util/${asm.bundle.version}</bundle>
<bundle dependency='true'>mvn:io.fabric8/kubernetes-model-common/${project.version}</bundle>
<bundle>mvn:io.fabric8/zjsonpatch/${project.version}</bundle>

<bundle>mvn:io.fabric8/zjsonpatch/${project.version}</bundle>
<bundle>mvn:io.fabric8/kubernetes-model-common/${project.version}</bundle>
<bundle>mvn:io.fabric8/kubernetes-model-core/${project.version}</bundle>
<bundle>mvn:io.fabric8/kubernetes-model-rbac/${project.version}</bundle>
<bundle>mvn:io.fabric8/kubernetes-model-admissionregistration/${project.version}</bundle>
Expand All @@ -64,7 +62,7 @@
<bundle>mvn:io.fabric8/kubernetes-model-storageclass/${project.version}</bundle>
<bundle>mvn:io.fabric8/kubernetes-model-resource/${project.version}</bundle>
<bundle>mvn:io.fabric8/openshift-model/${project.version}</bundle>
<bundle>mvn:io.fabric8/kubernetes-httpclient-okhttp/${project.version}/jar/bundle</bundle>
<bundle>mvn:io.fabric8/kubernetes-httpclient-jdk/${project.version}/jar/bundle</bundle>
<bundle>mvn:io.fabric8/kubernetes-client/${project.version}/jar/bundle</bundle>
</feature>

Expand Down
10 changes: 1 addition & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@

<!-- Core versions -->
<sundrio.version>0.200.0</sundrio.version>
<okhttp.version>3.12.12</okhttp.version>
<okhttp.bundle.version>3.12.1_1</okhttp.bundle.version>
<okio.version>1.17.6</okio.version>
<okio.bundle.version>1.15.0_1</okio.bundle.version>
<okhttp.version>4.12.0</okhttp.version>
<jackson.version>2.18.0</jackson.version>
<jetty.version>11.0.24</jetty.version>
<maven-core.version>3.9.9</maven-core.version>
Expand Down Expand Up @@ -872,11 +869,6 @@
<artifactId>picocli</artifactId>
<version>${picocli.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>${okio.version}</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component.annotations</artifactId>
Expand Down

0 comments on commit 3e9735c

Please sign in to comment.