hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From micha...@apache.org
Subject svn commit: r1663155 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
Date Sun, 01 Mar 2015 20:11:00 GMT
Author: michaelo
Date: Sun Mar  1 20:11:00 2015
New Revision: 1663155

URL: http://svn.apache.org/r1663155
Log:
HTTPCLIENT-1622: Name of HttpClientBuilder#setSslcontext inconsistent with the rest of SSL-related
methods

Method names are now uniformly SSLContext, variable names in camelcase.

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java?rev=1663155&r1=1663154&r2=1663155&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
Sun Mar  1 20:11:00 2015
@@ -164,7 +164,7 @@ public class HttpClientBuilder {
     private HttpRequestExecutor requestExec;
     private HostnameVerifier hostnameVerifier;
     private LayeredConnectionSocketFactory sslSocketFactory;
-    private SSLContext sslcontext;
+    private SSLContext sslContext;
     private HttpClientConnectionManager connManager;
     private boolean connManagerShared;
     private SchemePortResolver schemePortResolver;
@@ -288,9 +288,24 @@ public class HttpClientBuilder {
      *   org.apache.http.conn.HttpClientConnectionManager)} and the {@link #setSSLSocketFactory(
      *   org.apache.http.conn.socket.LayeredConnectionSocketFactory)} methods.
      * </p>
+     *
+     * @deprecated (4.5) use {@link #setSSLContext(SSLContext)}
+     */
+    @Deprecated
+    public final HttpClientBuilder setSslContext(final SSLContext sslcontext) {
+        return setSSLContext(sslcontext);
+    }
+
+    /**
+     * Assigns {@link SSLContext} instance.
+     * <p>
+     * Please note this value can be overridden by the {@link #setConnectionManager(
+     *   org.apache.http.conn.HttpClientConnectionManager)} and the {@link #setSSLSocketFactory(
+     *   org.apache.http.conn.socket.LayeredConnectionSocketFactory)} methods.
+     * </p>
      */
-    public final HttpClientBuilder setSslcontext(final SSLContext sslcontext) {
-        this.sslcontext = sslcontext;
+    public final HttpClientBuilder setSSLContext(final SSLContext sslContext) {
+        this.sslContext = sslContext;
         return this;
     }
 
@@ -930,9 +945,9 @@ public class HttpClientBuilder {
                 if (hostnameVerifierCopy == null) {
                     hostnameVerifierCopy = new DefaultHostnameVerifier(publicSuffixMatcherCopy);
                 }
-                if (sslcontext != null) {
+                if (sslContext != null) {
                     sslSocketFactoryCopy = new SSLConnectionSocketFactory(
-                            sslcontext, supportedProtocols, supportedCipherSuites, hostnameVerifierCopy);
+                            sslContext, supportedProtocols, supportedCipherSuites, hostnameVerifierCopy);
                 } else {
                     if (systemProperties) {
                         sslSocketFactoryCopy = new SSLConnectionSocketFactory(



Mime
View raw message