From 7127ebfc76951ec27207dc14cd81e2bd2f5adcfb Mon Sep 17 00:00:00 2001 From: slisaasquatch Date: Tue, 23 Jun 2020 09:19:53 -0700 Subject: [PATCH 1/3] Version bumps --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 99aa525..4dab5f7 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ UTF-8 - 5.6.0 + 5.6.2 @@ -38,17 +38,17 @@ org.apache.httpcomponents.client5 httpclient5 - 5.0 + 5.0.1 org.apache.httpcomponents.core5 httpcore5-reactive - 5.0 + 5.0.1 io.reactivex.rxjava3 rxjava - 3.0.0 + 3.0.4 com.google.code.findbugs From e28d0f483798d3360403976bce932f6fcd61de83 Mon Sep 17 00:00:00 2001 From: slisaasquatch Date: Tue, 23 Jun 2020 09:23:25 -0700 Subject: [PATCH 2/3] Remove unnecessary method --- .../HttpReactiveClientImpl.java | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/saasquatch/client5reactive/HttpReactiveClientImpl.java b/src/main/java/com/saasquatch/client5reactive/HttpReactiveClientImpl.java index b824b2c..4d26a46 100644 --- a/src/main/java/com/saasquatch/client5reactive/HttpReactiveClientImpl.java +++ b/src/main/java/com/saasquatch/client5reactive/HttpReactiveClientImpl.java @@ -2,11 +2,7 @@ import java.nio.ByteBuffer; import java.util.Objects; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import org.apache.hc.client5.http.async.HttpAsyncClient; -import org.apache.hc.client5.http.impl.async.MinimalHttpAsyncClient; -import org.apache.hc.client5.http.protocol.HttpClientContext; import org.apache.hc.core5.http.HttpResponse; import org.apache.hc.core5.http.Message; import org.apache.hc.core5.http.nio.AsyncPushConsumer; @@ -38,8 +34,8 @@ public Publisher execute(AsyncRequestProducer requestProducer, Objects.requireNonNull(requestProducer); Objects.requireNonNull(responseConsumer); return Maybe.create(emitter -> { - httpAsyncClient.execute(requestProducer, responseConsumer, pushHandlerFactory, - defaultHttpContext(context), FutureCallbacks.maybeEmitter(emitter)); + httpAsyncClient.execute(requestProducer, responseConsumer, pushHandlerFactory, context, + FutureCallbacks.maybeEmitter(emitter)); }).toFlowable(); } @@ -56,23 +52,8 @@ public Publisher>> streamingExecute( return Maybe.>>create(emitter -> { final ReactiveResponseConsumer responseConsumer = new ReactiveResponseConsumer(FutureCallbacks.maybeEmitter(emitter)); - httpAsyncClient.execute(requestProducer, responseConsumer, pushHandlerFactory, - defaultHttpContext(context), null); + httpAsyncClient.execute(requestProducer, responseConsumer, pushHandlerFactory, context, null); }).toFlowable(); } - /** - * Create a default {@link HttpContext} if the given one is null. In theory this method should not - * be needed, since according to the JavaDoc in {@link HttpAsyncClient}, {@link HttpContext} can - * be null. However, in Apache HttpClient version 5.0 there's a bug where some implementations of - * {@link HttpAsyncClient} like {@link MinimalHttpAsyncClient} reject null {@link HttpContext}. An - * issue has already been filed - * here. Once that's fixed, - * this method can be removed. - */ - @Nonnull - private static HttpContext defaultHttpContext(@Nullable HttpContext context) { - return context == null ? HttpClientContext.create() : context; - } - } From 08e2783ae0c6bfc1626000cfe1bdc02ec8e280d9 Mon Sep 17 00:00:00 2001 From: slisaasquatch Date: Tue, 23 Jun 2020 09:25:30 -0700 Subject: [PATCH 3/3] Release version bump --- README.md | 4 ++-- pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ad83bc1..897605a 100644 --- a/README.md +++ b/README.md @@ -101,14 +101,14 @@ Maven com.github.saasquatch apache-client5-reactive - 0.0.1 + 0.0.2 ``` Gradle ```gradle -compile 'com.github.saasquatch:apache-client5-reactive:0.0.1' +compile 'com.github.saasquatch:apache-client5-reactive:0.0.2' ``` ## License diff --git a/pom.xml b/pom.xml index 4dab5f7..55fca44 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.saasquatch apache-client5-reactive - 0.0.1-SNAPSHOT + 0.0.2-SNAPSHOT jar apache-client5-reactive