hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [1/3] httpcomponents-client git commit: Checkstyle fixes: Use final and tab police.
Date Thu, 13 Jul 2017 00:29:20 GMT
Repository: httpcomponents-client
Updated Branches:
  refs/heads/4.5.x 6156eb1f0 -> 61529d1f8


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java b/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
index 70cbe50..a8d1472 100644
--- a/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
+++ b/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
@@ -821,7 +821,7 @@ final class NTLMEngineImpl implements NTLMEngine {
 
         private Cipher initCipher() throws NTLMEngineException
         {
-            Cipher cipher;
+            final Cipher cipher;
             try
             {
                 cipher = Cipher.getInstance( "RC4" );
@@ -834,7 +834,7 @@ final class NTLMEngineImpl implements NTLMEngine {
                     cipher.init( Cipher.DECRYPT_MODE, new SecretKeySpec( sealingKey, "RC4"
) );
                 }
             }
-            catch ( Exception e )
+            catch ( final Exception e )
             {
                 throw new NTLMEngineException( e.getMessage(), e );
             }
@@ -1779,7 +1779,7 @@ final class NTLMEngineImpl implements NTLMEngine {
             writeUShort( newTargetInfo, MSV_AV_CHANNEL_BINDINGS, appendLength + 8 );
             writeUShort( newTargetInfo, 16, appendLength + 10 );
 
-            byte[] channelBindingsHash;
+            final byte[] channelBindingsHash;
             try
             {
                 final byte[] certBytes = peerServerCertificate.getEncoded();
@@ -1795,11 +1795,11 @@ final class NTLMEngineImpl implements NTLMEngine {
                 final MessageDigest md5 = getMD5();
                 channelBindingsHash = md5.digest( channelBindingStruct );
             }
-            catch ( CertificateEncodingException e )
+            catch ( final CertificateEncodingException e )
             {
                 throw new NTLMEngineException( e.getMessage(), e );
             }
-            catch ( NoSuchAlgorithmException e )
+            catch ( final NoSuchAlgorithmException e )
             {
                 throw new NTLMEngineException( e.getMessage(), e );
             }
@@ -1841,7 +1841,7 @@ final class NTLMEngineImpl implements NTLMEngine {
     static MessageDigest getMD5() {
         try {
             return MessageDigest.getInstance("MD5");
-        } catch (NoSuchAlgorithmException ex) {
+        } catch (final NoSuchAlgorithmException ex) {
             throw new RuntimeException("MD5 message digest doesn't seem to exist - fatal
error: "+ex.getMessage(), ex);
         }
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java b/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
index 4806e38..68259f3 100644
--- a/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
+++ b/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
@@ -1216,7 +1216,7 @@ public class HttpClientBuilder {
                         connectionEvictor.shutdown();
                         try {
                             connectionEvictor.awaitTermination(1L, TimeUnit.SECONDS);
-                        } catch (InterruptedException interrupted) {
+                        } catch (final InterruptedException interrupted) {
                             Thread.currentThread().interrupt();
                         }
                     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java b/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
index cee6d96..dbc205e 100644
--- a/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
+++ b/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109Spec.java
@@ -135,7 +135,7 @@ public class RFC2109Spec extends CookieSpecBase {
     @Override
     public List<Header> formatCookies(final List<Cookie> cookies) {
         Args.notEmpty(cookies, "List of cookies");
-        List<Cookie> cookieList;
+        final List<Cookie> cookieList;
         if (cookies.size() > 1) {
             // Create a mutable copy and sort the copy.
             cookieList = new ArrayList<Cookie>(cookies);

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java b/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
index 657f8df..d04b7ca 100644
--- a/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
+++ b/httpclient/src/test/java/org/apache/http/conn/ssl/TestHostnameVerifier.java
@@ -316,7 +316,7 @@ public class TestHostnameVerifier {
 
     @Test
     public void testHTTPCLIENT_1097() {
-        String cns[];
+        final String cns[];
         final String alt[] = {};
         final X509HostnameVerifier bhv = new BrowserCompatHostnameVerifier();
         final X509HostnameVerifier shv = new StrictHostnameVerifier();

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient/src/test/java/org/apache/http/impl/auth/TestNTLMEngineImpl.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/impl/auth/TestNTLMEngineImpl.java b/httpclient/src/test/java/org/apache/http/impl/auth/TestNTLMEngineImpl.java
index 8af33b6..3bd3a82 100644
--- a/httpclient/src/test/java/org/apache/http/impl/auth/TestNTLMEngineImpl.java
+++ b/httpclient/src/test/java/org/apache/http/impl/auth/TestNTLMEngineImpl.java
@@ -76,7 +76,7 @@ public class TestNTLMEngineImpl {
 
     /* Test suite MD4 helper */
     static void checkMD4(final String input, final String hexOutput) throws Exception {
-        NTLMEngineImpl.MD4 md4;
+        final NTLMEngineImpl.MD4 md4;
         md4 = new NTLMEngineImpl.MD4();
         md4.update(input.getBytes(Consts.ASCII));
         final byte[] answer = md4.getOutput();

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/61529d1f/httpclient/src/test/java/org/apache/http/localserver/EchoHandler.java
----------------------------------------------------------------------
diff --git a/httpclient/src/test/java/org/apache/http/localserver/EchoHandler.java b/httpclient/src/test/java/org/apache/http/localserver/EchoHandler.java
index 380607e..298e77b 100644
--- a/httpclient/src/test/java/org/apache/http/localserver/EchoHandler.java
+++ b/httpclient/src/test/java/org/apache/http/localserver/EchoHandler.java
@@ -89,7 +89,7 @@ public class EchoHandler
 
         // For some reason, just putting the incoming entity into
         // the response will not work. We have to buffer the message.
-        byte[] data;
+        final byte[] data;
         if (entity == null) {
             data = new byte [0];
         } else {


Mime
View raw message