From 001eff70646c982c8c4a7c8a385d92f42579f2b5 Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Sun, 13 Oct 2024 11:26:48 +0200 Subject: [PATCH] Corrected method chaining in ClientTlsStrategyBuilder --- .../client5/http/ssl/ClientTlsStrategyBuilder.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ClientTlsStrategyBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ClientTlsStrategyBuilder.java index 1a87646df..5f27f00e5 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ClientTlsStrategyBuilder.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ClientTlsStrategyBuilder.java @@ -133,11 +133,24 @@ public class ClientTlsStrategyBuilder { /** * Sets {@link HostnameVerificationPolicy} value. + * + * @deprecated Use #setHostVerificationPolicy */ + @Deprecated public void setHostnameVerificationPolicy(final HostnameVerificationPolicy hostnameVerificationPolicy) { this.hostnameVerificationPolicy = hostnameVerificationPolicy; } + /** + * Sets {@link HostnameVerificationPolicy} value. + * + * @since 5.5 + */ + public ClientTlsStrategyBuilder setHostVerificationPolicy(final HostnameVerificationPolicy hostnameVerificationPolicy) { + this.hostnameVerificationPolicy = hostnameVerificationPolicy; + return this; + } + /** * Sets {@link HostnameVerifier} instance. *