From f78ec699ab4d50e8e729e914980683e15862d1f9 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Wed, 11 Jan 2023 11:26:08 -0500 Subject: [PATCH] Camel case names --- .../hc/client5/testing/sync/TestSSLSocketFactory.java | 8 ++++---- .../hc/client5/http/ssl/ConscryptClientTlsStrategy.java | 8 ++++---- .../hc/client5/http/ssl/DefaultClientTlsStrategy.java | 8 ++++---- .../hc/client5/http/examples/AsyncClientCustomSSL.java | 4 ++-- .../hc/client5/http/examples/ClientConfiguration.java | 4 ++-- .../apache/hc/client5/http/examples/ClientCustomSSL.java | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSSLSocketFactory.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSSLSocketFactory.java index 21954af3f..d0c0a3f13 100644 --- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSSLSocketFactory.java +++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSSLSocketFactory.java @@ -229,9 +229,9 @@ public class TestSSLSocketFactory { final HttpContext context = new BasicHttpContext(); // Use default SSL context - final SSLContext defaultsslcontext = SSLContexts.createDefault(); + final SSLContext defaultSslContext = SSLContexts.createDefault(); - final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(defaultsslcontext, + final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(defaultSslContext, NoopHostnameVerifier.INSTANCE); try (final Socket socket = socketFactory.createSocket(context)) { @@ -274,11 +274,11 @@ public class TestSSLSocketFactory { final HttpContext context = new BasicHttpContext(); // @formatter:off - final SSLContext sslcontext = SSLContexts.custom() + final SSLContext sslContext = SSLContexts.custom() .loadTrustMaterial(null, trustStrategy) .build(); // @formatter:on - final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(sslcontext, + final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE); try (final Socket socket = socketFactory.createSocket(context)) { diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ConscryptClientTlsStrategy.java b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ConscryptClientTlsStrategy.java index d3799d559..465a8f258 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ConscryptClientTlsStrategy.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/ConscryptClientTlsStrategy.java @@ -76,13 +76,13 @@ public class ConscryptClientTlsStrategy extends AbstractClientTlsStrategy { } public ConscryptClientTlsStrategy( - final SSLContext sslcontext, + final SSLContext sslContext, final HostnameVerifier hostnameVerifier) { - this(sslcontext, null, null, SSLBufferMode.STATIC, hostnameVerifier); + this(sslContext, null, null, SSLBufferMode.STATIC, hostnameVerifier); } - public ConscryptClientTlsStrategy(final SSLContext sslcontext) { - this(sslcontext, HttpsSupport.getDefaultHostnameVerifier()); + public ConscryptClientTlsStrategy(final SSLContext sslContext) { + this(sslContext, HttpsSupport.getDefaultHostnameVerifier()); } @Override diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultClientTlsStrategy.java b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultClientTlsStrategy.java index bad25e4ed..1267071a8 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultClientTlsStrategy.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultClientTlsStrategy.java @@ -94,13 +94,13 @@ public class DefaultClientTlsStrategy extends AbstractClientTlsStrategy { } public DefaultClientTlsStrategy( - final SSLContext sslcontext, + final SSLContext sslContext, final HostnameVerifier hostnameVerifier) { - this(sslcontext, null, null, SSLBufferMode.STATIC, hostnameVerifier); + this(sslContext, null, null, SSLBufferMode.STATIC, hostnameVerifier); } - public DefaultClientTlsStrategy(final SSLContext sslcontext) { - this(sslcontext, HttpsSupport.getDefaultHostnameVerifier()); + public DefaultClientTlsStrategy(final SSLContext sslContext) { + this(sslContext, HttpsSupport.getDefaultHostnameVerifier()); } @Override diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientCustomSSL.java b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientCustomSSL.java index 12e28eb52..39cf958b4 100644 --- a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientCustomSSL.java +++ b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientCustomSSL.java @@ -58,14 +58,14 @@ public class AsyncClientCustomSSL { public static void main(final String[] args) throws Exception { // Trust standard CA and those trusted by our custom strategy - final SSLContext sslcontext = SSLContexts.custom() + final SSLContext sslContext = SSLContexts.custom() .loadTrustMaterial((chain, authType) -> { final X509Certificate cert = chain[0]; return "CN=httpbin.org".equalsIgnoreCase(cert.getSubjectDN().getName()); }) .build(); final TlsStrategy tlsStrategy = ClientTlsStrategyBuilder.create() - .setSslContext(sslcontext) + .setSslContext(sslContext) .build(); final PoolingAsyncClientConnectionManager cm = PoolingAsyncClientConnectionManagerBuilder.create() diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientConfiguration.java b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientConfiguration.java index e0671f442..fd49162de 100644 --- a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientConfiguration.java +++ b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientConfiguration.java @@ -148,13 +148,13 @@ public class ClientConfiguration { // SSL context for secure connections can be created either based on // system or application specific properties. - final SSLContext sslcontext = SSLContexts.createSystemDefault(); + final SSLContext sslContext = SSLContexts.createSystemDefault(); // Create a registry of custom connection socket factories for supported // protocol schemes. final Registry socketFactoryRegistry = RegistryBuilder.create() .register("http", PlainConnectionSocketFactory.INSTANCE) - .register("https", new SSLConnectionSocketFactory(sslcontext)) + .register("https", new SSLConnectionSocketFactory(sslContext)) .build(); // Use custom DNS resolver to override the system DNS resolution. diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientCustomSSL.java b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientCustomSSL.java index 18f6568e0..2e71a339b 100644 --- a/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientCustomSSL.java +++ b/httpclient5/src/test/java/org/apache/hc/client5/http/examples/ClientCustomSSL.java @@ -54,14 +54,14 @@ public class ClientCustomSSL { public final static void main(final String[] args) throws Exception { // Trust standard CA and those trusted by our custom strategy - final SSLContext sslcontext = SSLContexts.custom() + final SSLContext sslContext = SSLContexts.custom() .loadTrustMaterial((chain, authType) -> { final X509Certificate cert = chain[0]; return "CN=httpbin.org".equalsIgnoreCase(cert.getSubjectDN().getName()); }) .build(); final SSLConnectionSocketFactory sslSocketFactory = SSLConnectionSocketFactoryBuilder.create() - .setSslContext(sslcontext) + .setSslContext(sslContext) .build(); // Allow TLSv1.3 protocol only final HttpClientConnectionManager cm = PoolingHttpClientConnectionManagerBuilder.create()