You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2024/10/13 09:33:22 UTC

(httpcomponents-client) 01/01: Corrected method chaining in ClientTlsStrategyBuilder

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git

commit 001eff70646c982c8c4a7c8a385d92f42579f2b5
Author: Osip Fatkullin <os...@gmail.com>
AuthorDate: Sun Oct 13 11:26:48 2024 +0200

    Corrected method chaining in ClientTlsStrategyBuilder
---
 .../hc/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.
      *