From 24b3f71a8fa36a7470eda8efd805fbf882afa3a0 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Tue, 18 Feb 2020 14:44:58 +0100 Subject: [PATCH] Removed deprecated methods --- .../http/async/methods/SimpleHttpRequest.java | 16 ---------------- .../http/async/methods/SimpleHttpResponse.java | 16 ---------------- .../impl/async/CloseableHttpAsyncClient.java | 9 --------- 3 files changed, 41 deletions(-) diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpRequest.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpRequest.java index d675169ec..3d41bfef4 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpRequest.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpRequest.java @@ -93,22 +93,6 @@ public final class SimpleHttpRequest extends ConfigurableHttpRequest { this.body = SimpleBody.create(bodyText, contentType); } - /** - * @deprecated Use {@link #setBody(byte[], ContentType)}. - */ - @Deprecated - public void setBodyBytes(final byte[] bodyBytes, final ContentType contentType) { - this.body = SimpleBody.create(bodyBytes, contentType); - } - - /** - * @deprecated Use {@link #setBody(String, ContentType)}. - */ - @Deprecated - public void setBodyText(final String bodyText, final ContentType contentType) { - this.body = SimpleBody.create(bodyText, contentType); - } - public SimpleBody getBody() { return body; } diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpResponse.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpResponse.java index 793507f4b..bad41df2b 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpResponse.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpResponse.java @@ -105,22 +105,6 @@ public final class SimpleHttpResponse extends BasicHttpResponse { this.body = SimpleBody.create(bodyText, contentType); } - /** - * @deprecated Use {@link #setBody(byte[], ContentType)}. - */ - @Deprecated - public void setBodyBytes(final byte[] bodyBytes, final ContentType contentType) { - this.body = SimpleBody.create(bodyBytes, contentType); - } - - /** - * @deprecated Use {@link #setBody(String, ContentType)}. - */ - @Deprecated - public void setBodyText(final String bodyText, final ContentType contentType) { - this.body = SimpleBody.create(bodyText, contentType); - } - public SimpleBody getBody() { return body; } diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/CloseableHttpAsyncClient.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/CloseableHttpAsyncClient.java index 03d035059..ba0c21c4d 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/CloseableHttpAsyncClient.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/CloseableHttpAsyncClient.java @@ -45,7 +45,6 @@ import org.apache.hc.core5.http.nio.AsyncRequestProducer; import org.apache.hc.core5.http.nio.AsyncResponseConsumer; import org.apache.hc.core5.http.nio.HandlerFactory; import org.apache.hc.core5.http.protocol.HttpContext; -import org.apache.hc.core5.io.CloseMode; import org.apache.hc.core5.io.ModalCloseable; import org.apache.hc.core5.reactor.IOReactorStatus; import org.apache.hc.core5.util.Args; @@ -67,14 +66,6 @@ public abstract class CloseableHttpAsyncClient implements HttpAsyncClient, Modal public abstract void initiateShutdown(); - /** - * @deprecated Use {@link #close(CloseMode)} - */ - @Deprecated - public void shutdown(final CloseMode closeMode) { - close(closeMode); - } - protected abstract Future doExecute( final HttpHost target, final AsyncRequestProducer requestProducer,