You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2017/07/13 00:29:22 UTC

[3/3] httpcomponents-client git commit: Checkstyle fixes: Use final and tab police.

Checkstyle fixes: Use final and tab police.

Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/61529d1f
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/61529d1f
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/61529d1f

Branch: refs/heads/4.5.x
Commit: 61529d1f880ce4ff371adad74da580865f2680d6
Parents: 6156eb1
Author: Gary Gregory <gg...@apache.org>
Authored: Wed Jul 12 17:29:17 2017 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Wed Jul 12 17:29:17 2017 -0700

----------------------------------------------------------------------
 .../impl/client/cache/CachingHttpClient.java    |    6 +-
 .../impl/client/cache/CacheKeyGenerator.java    |    2 +-
 .../http/impl/client/cache/CachingExec.java     |    2 +-
 .../impl/client/cache/HeapResourceFactory.java  |    2 +-
 .../memcached/MemcachedCacheEntryImpl.java      |    8 +-
 .../impl/HttpProxyConfigurationActivator.java   |    2 +-
 .../apache/http/conn/ssl/AbstractVerifier.java  |    2 +-
 .../apache/http/impl/auth/CredSspScheme.java    | 2252 +++++++++---------
 .../org/apache/http/impl/auth/DebugUtil.java    |  192 +-
 .../apache/http/impl/auth/NTLMEngineImpl.java   |   12 +-
 .../http/impl/client/HttpClientBuilder.java     |    2 +-
 .../apache/http/impl/cookie/RFC2109Spec.java    |    2 +-
 .../http/conn/ssl/TestHostnameVerifier.java     |    2 +-
 .../http/impl/auth/TestNTLMEngineImpl.java      |    2 +-
 .../apache/http/localserver/EchoHandler.java    |    2 +-
 15 files changed, 1245 insertions(+), 1245 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient-cache/src/main/java-deprecated/org/apache/http/impl/client/cache/CachingHttpClient.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java-deprecated/org/apache/http/impl/client/cache/CachingHttpClient.java b/httpclient-cache/src/main/java-deprecated/org/apache/http/impl/client/cache/CachingHttpClient.java
index c066eaf..20f54cf 100644
--- a/httpclient-cache/src/main/java-deprecated/org/apache/http/impl/client/cache/CachingHttpClient.java
+++ b/httpclient-cache/src/main/java-deprecated/org/apache/http/impl/client/cache/CachingHttpClient.java
@@ -387,7 +387,7 @@ public class CachingHttpClient implements HttpClient {
     private <T> T handleAndConsume(
             final ResponseHandler<? extends T> responseHandler,
             final HttpResponse response) throws Error, IOException {
-        T result;
+        final T result;
         try {
             result = responseHandler.handleResponse(response);
         } catch (final Exception t) {
@@ -429,7 +429,7 @@ public class CachingHttpClient implements HttpClient {
     public HttpResponse execute(final HttpHost target, final HttpRequest originalRequest, final HttpContext context)
             throws IOException {
 
-        HttpRequestWrapper request;
+        final HttpRequestWrapper request;
         if (originalRequest instanceof HttpRequestWrapper) {
             request = ((HttpRequestWrapper) originalRequest);
         } else {
@@ -693,7 +693,7 @@ public class CachingHttpClient implements HttpClient {
         final VersionInfo vi = VersionInfo.loadVersionInfo("org.apache.http.client", getClass().getClassLoader());
         final String release = (vi != null) ? vi.getRelease() : VersionInfo.UNAVAILABLE;
 
-        String value;
+        final String value;
         if ("http".equalsIgnoreCase(pv.getProtocol())) {
             value = String.format("%d.%d localhost (Apache-HttpClient/%s (cache))", pv.getMajor(), pv.getMinor(),
                     release);

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
index 91ca500..70df8cd 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheKeyGenerator.java
@@ -155,7 +155,7 @@ class CacheKeyGenerator {
         }
         Collections.sort(variantHeaderNames);
 
-        StringBuilder buf;
+        final StringBuilder buf;
         try {
             buf = new StringBuilder("{");
             boolean first = true;

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
index 33bdbf1..f7da4d0 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingExec.java
@@ -527,7 +527,7 @@ public class CachingExec implements ClientExecChain {
         final VersionInfo vi = VersionInfo.loadVersionInfo("org.apache.http.client", getClass().getClassLoader());
         final String release = (vi != null) ? vi.getRelease() : VersionInfo.UNAVAILABLE;
 
-        String value;
+        final String value;
         final int major = pv.getMajor();
         final int minor = pv.getMinor();
         if ("http".equalsIgnoreCase(pv.getProtocol())) {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java
index 11506e2..8cb9a2d 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/HeapResourceFactory.java
@@ -68,7 +68,7 @@ public class HeapResourceFactory implements ResourceFactory {
     public Resource copy(
             final String requestId,
             final Resource resource) throws IOException {
-        byte[] body;
+        final byte[] body;
         if (resource instanceof HeapResource) {
             body = ((HeapResource) resource).getByteArray();
         } else {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedCacheEntryImpl.java
----------------------------------------------------------------------
diff --git a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedCacheEntryImpl.java b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedCacheEntryImpl.java
index e1c4e37..9bc11e5 100644
--- a/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedCacheEntryImpl.java
+++ b/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedCacheEntryImpl.java
@@ -58,7 +58,7 @@ public class MemcachedCacheEntryImpl implements MemcachedCacheEntry {
     @Override
     synchronized public byte[] toByteArray() {
         final ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        ObjectOutputStream oos;
+        final ObjectOutputStream oos;
         try {
             oos = new ObjectOutputStream(bos);
             oos.writeObject(this.key);
@@ -92,9 +92,9 @@ public class MemcachedCacheEntryImpl implements MemcachedCacheEntry {
     @Override
     synchronized public void set(final byte[] bytes) {
         final ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
-        ObjectInputStream ois;
-        String s;
-        HttpCacheEntry entry;
+        final ObjectInputStream ois;
+        final String s;
+        final HttpCacheEntry entry;
         try {
             ois = new ObjectInputStream(bis);
             s = (String)ois.readObject();

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/HttpProxyConfigurationActivator.java
----------------------------------------------------------------------
diff --git a/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/HttpProxyConfigurationActivator.java b/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/HttpProxyConfigurationActivator.java
index 16d5c1b..4ca17f1 100644
--- a/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/HttpProxyConfigurationActivator.java
+++ b/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/HttpProxyConfigurationActivator.java
@@ -155,7 +155,7 @@ public final class HttpProxyConfigurationActivator implements BundleActivator, M
     @Override
     public void updated(final String pid, @SuppressWarnings("rawtypes") final Dictionary config) throws ConfigurationException {
         final ServiceRegistration registration = registeredConfigurations.get(pid);
-        OSGiProxyConfiguration proxyConfiguration;
+        final OSGiProxyConfiguration proxyConfiguration;
 
         if (registration == null) {
             proxyConfiguration = new OSGiProxyConfiguration();

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java b/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
index 3777113..ec7c0bf 100644
--- a/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
+++ b/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
@@ -203,7 +203,7 @@ public abstract class AbstractVerifier implements X509HostnameVerifier {
         final boolean doWildcard = parts.length >= 3 && parts[0].endsWith("*") &&
                 (!strict || validCountryWildcard(parts));
         if (doWildcard) {
-            boolean match;
+            final boolean match;
             final String firstpart = parts[0];
             if (firstpart.length() > 1) { // e.g. server*
                 final String prefix = firstpart.substring(0, firstpart.length() - 1); // e.g. server