hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1788706 - in /httpcomponents: httpclient/branches/4.5.x/fluent-hc/src/main/java/org/apache/http/client/fluent/ httpclient/branches/4.5.x/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/ httpclient/branches/4.5.x/httpclient-osgi/src...
Date Sun, 26 Mar 2017 02:26:36 GMT
Author: ggregory
Date: Sun Mar 26 02:26:35 2017
New Revision: 1788706

URL: http://svn.apache.org/viewvc?rev=1788706&view=rev
Log:
Use final.

Modified:
    httpcomponents/httpclient/branches/4.5.x/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
    httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiHttpRoutePlanner.java
    httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/test/java/org/apache/http/osgi/impl/WeakListTest.java
    httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
    httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java
    httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java
    httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
    httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
    httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
    httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
    httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java
    httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
    httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
    httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java
    httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java

Modified: httpcomponents/httpclient/branches/4.5.x/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/fluent-hc/src/main/java/org/apache/http/client/fluent/Request.java
Sun Mar 26 02:26:35 2017
@@ -353,7 +353,7 @@ public class Request {
 
     public Request bodyForm(final Iterable <? extends NameValuePair> formParams, final
Charset charset) {
         final List<NameValuePair> paramList = new ArrayList<NameValuePair>();
-        for (NameValuePair param : formParams) {
+        for (final NameValuePair param : formParams) {
             paramList.add(param);
         }
         final ContentType contentType = ContentType.create(URLEncodedUtils.CONTENT_TYPE,
charset);

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiHttpRoutePlanner.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiHttpRoutePlanner.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiHttpRoutePlanner.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/main/java/org/apache/http/osgi/impl/OSGiHttpRoutePlanner.java
Sun Mar 26 02:26:35 2017
@@ -53,7 +53,7 @@ final class OSGiHttpRoutePlanner extends
                                                                   "([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\."
+
                                                                   "([01]?\\d\\d?|2[0-4]\\d|25[0-5])$");
 
-    private List<ProxyConfiguration> proxyConfigurations;
+    private final List<ProxyConfiguration> proxyConfigurations;
 
     public OSGiHttpRoutePlanner(final List<ProxyConfiguration> proxyConfigurations)
{
         super(null);

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/test/java/org/apache/http/osgi/impl/WeakListTest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/test/java/org/apache/http/osgi/impl/WeakListTest.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/test/java/org/apache/http/osgi/impl/WeakListTest.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient-osgi/src/test/java/org/apache/http/osgi/impl/WeakListTest.java
Sun Mar 26 02:26:35 2017
@@ -53,7 +53,7 @@ public class WeakListTest {
         boolean thrown = false;
         try {
             it.next();
-        } catch (NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
             thrown = true;
         }
         assertTrue(thrown);

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
Sun Mar 26 02:26:35 2017
@@ -136,13 +136,13 @@ public abstract class AbstractVerifier i
         final List<SubjectName> allSubjectAltNames = DefaultHostnameVerifier.getSubjectAltNames(cert);
         final List<String> subjectAlts = new ArrayList<String>();
         if (InetAddressUtils.isIPv4Address(host) || InetAddressUtils.isIPv6Address(host))
{
-            for (SubjectName subjectName: allSubjectAltNames) {
+            for (final SubjectName subjectName: allSubjectAltNames) {
                 if (subjectName.getType() == SubjectName.IP) {
                     subjectAlts.add(subjectName.getValue());
                 }
             }
         } else {
-            for (SubjectName subjectName: allSubjectAltNames) {
+            for (final SubjectName subjectName: allSubjectAltNames) {
                 if (subjectName.getType() == SubjectName.DNS) {
                     subjectAlts.add(subjectName.getValue());
                 }
@@ -262,7 +262,7 @@ public abstract class AbstractVerifier i
             return null;
         }
         final List<String> dnsAlts = new ArrayList<String>();
-        for (SubjectName subjectName: subjectAltNames) {
+        for (final SubjectName subjectName: subjectAltNames) {
             if (subjectName.getType() == SubjectName.DNS) {
                 dnsAlts.add(subjectName.getValue());
             }

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/conn/ssl/DefaultHostnameVerifier.java
Sun Mar 26 02:26:35 2017
@@ -303,7 +303,7 @@ public final class DefaultHostnameVerifi
                 return Collections.emptyList();
             }
             final List<SubjectName> result = new ArrayList<SubjectName>();
-            for (List<?> entry: entries) {
+            for (final List<?> entry: entries) {
                 final Integer type = entry.size() >= 2 ? (Integer) entry.get(0) : null;
                 if (type != null) {
                     final String s = (String) entry.get(1);

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultCredentialsProvider.java
Sun Mar 26 02:26:35 2017
@@ -132,7 +132,7 @@ public class SystemDefaultCredentialsPro
                                     systemcreds = new PasswordAuthentication(proxyUser, proxyPassword
!= null ? proxyPassword.toCharArray() : new char[] {});
                                 }
                             }
-                        } catch (NumberFormatException ex) {
+                        } catch (final NumberFormatException ex) {
                         }
                     }
                 }

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
Sun Mar 26 02:26:35 2017
@@ -691,7 +691,7 @@ public abstract class AbstractNIOConnPoo
         try {
             final RouteSpecificPool<T, C, E> pool = getPool(route);
             int pendingCount = 0;
-            for (LeaseRequest<T, C, E> request: leasingRequests) {
+            for (final LeaseRequest<T, C, E> request: leasingRequests) {
                 if (LangUtils.equals(route, request.getRoute())) {
                     pendingCount++;
                 }

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
Sun Mar 26 02:26:35 2017
@@ -637,7 +637,7 @@ public class SSLIOSession implements IOS
         this.sslEngine.closeOutbound();
         try {
             updateEventMask();
-        } catch (CancelledKeyException ex) {
+        } catch (final CancelledKeyException ex) {
             shutdown();
         }
     }

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
Sun Mar 26 02:26:35 2017
@@ -433,7 +433,7 @@ public class TestChunkDecoder {
         try {
             decoder2.read(dst);
             Assert.fail("MessageConstraintException expected");
-        } catch (MessageConstraintException ex) {
+        } catch (final MessageConstraintException ex) {
         }
     }
 
@@ -470,7 +470,7 @@ public class TestChunkDecoder {
         try {
             decoder2.read(dst);
             Assert.fail("MessageConstraintException expected");
-        } catch (MessageConstraintException ex) {
+        } catch (final MessageConstraintException ex) {
         }
     }
 
@@ -506,7 +506,7 @@ public class TestChunkDecoder {
         try {
             decoder2.read(dst);
             Assert.fail("MessageConstraintException expected");
-        } catch (MessageConstraintException ex) {
+        } catch (final MessageConstraintException ex) {
         }
     }
 
@@ -543,7 +543,7 @@ public class TestChunkDecoder {
         try {
             decoder2.read(dst);
             Assert.fail("MessageConstraintException expected");
-        } catch (MessageConstraintException ex) {
+        } catch (final MessageConstraintException ex) {
         }
     }
 

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
Sun Mar 26 02:26:35 2017
@@ -153,7 +153,7 @@ public class TestSessionInOutBuffers {
         try {
             inbuf2.readLine(line, false);
             Assert.fail("MessageConstraintException expected");
-        } catch (MessageConstraintException ex) {
+        } catch (final MessageConstraintException ex) {
         }
     }
 
@@ -176,7 +176,7 @@ public class TestSessionInOutBuffers {
         try {
             inbuf2.readLine(line, false);
             Assert.fail("MessageConstraintException expected");
-        } catch (MessageConstraintException ex) {
+        } catch (final MessageConstraintException ex) {
         }
     }
 

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java
Sun Mar 26 02:26:35 2017
@@ -99,7 +99,7 @@ public class TestClientOutOfSequenceResp
         try {
             final HttpResponse response2 = future2.get();
             Assert.assertEquals(200, response2.getStatusLine().getStatusCode());
-        } catch (ExecutionException ex) {
+        } catch (final ExecutionException ex) {
             Assert.assertTrue(ex.getCause() instanceof HttpException);
         }
     }

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
Sun Mar 26 02:26:35 2017
@@ -169,7 +169,7 @@ public class TestHttpAsyncHandlersPipeli
             final List<HttpResponse> responses = future.get();
             Assert.assertNotNull(responses);
             Assert.assertEquals(3, responses.size());
-            for (HttpResponse response: responses) {
+            for (final HttpResponse response: responses) {
                 Assert.assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
                 Assert.assertEquals(expectedPattern, EntityUtils.toString(response.getEntity()));
             }
@@ -203,7 +203,7 @@ public class TestHttpAsyncHandlersPipeli
             final List<HttpResponse> responses = future.get();
             Assert.assertNotNull(responses);
             Assert.assertEquals(3, responses.size());
-            for (HttpResponse response: responses) {
+            for (final HttpResponse response: responses) {
                 Assert.assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
             }
         }
@@ -247,7 +247,7 @@ public class TestHttpAsyncHandlersPipeli
             final List<HttpResponse> responses = future.get();
             Assert.assertNotNull(responses);
             Assert.assertEquals(3, responses.size());
-            for (HttpResponse response: responses) {
+            for (final HttpResponse response: responses) {
                 Assert.assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
                 Assert.assertEquals(expectedPattern, EntityUtils.toString(response.getEntity()));
             }
@@ -335,7 +335,7 @@ public class TestHttpAsyncHandlersPipeli
             final List<HttpResponse> responses = future.get();
             Assert.assertNotNull(responses);
             Assert.assertEquals(3, responses.size());
-            for (HttpResponse response: responses) {
+            for (final HttpResponse response: responses) {
                 Assert.assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
             }
             Assert.assertEquals(expectedPattern1, EntityUtils.toString(responses.get(0).getEntity()));
@@ -397,7 +397,7 @@ public class TestHttpAsyncHandlersPipeli
             final Future<List<HttpResponse>> future = this.client.executePipelined(target,
requestProducers, responseConsumers, null, null);
             try {
                 future.get();
-            } catch (ExecutionException ex) {
+            } catch (final ExecutionException ex) {
                 final Throwable cause = ex.getCause();
                 Assert.assertTrue(cause instanceof ConnectionClosedException);
             }

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
Sun Mar 26 02:26:35 2017
@@ -179,7 +179,7 @@ public class HttpClientNio {
                 new ArrayList<HttpAsyncRequestProducer>(requests.size());
         final List<HttpAsyncResponseConsumer<HttpResponse>> responseConsumers
=
                 new ArrayList<HttpAsyncResponseConsumer<HttpResponse>>(requests.size());
-        for (HttpRequest request: requests) {
+        for (final HttpRequest request: requests) {
             requestProducers.add(new BasicAsyncRequestProducer(target, request));
             responseConsumers.add(new BasicAsyncResponseConsumer());
         }

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java
Sun Mar 26 02:26:35 2017
@@ -110,7 +110,7 @@ public final class ContentType implement
             TEXT_PLAIN,
             TEXT_XML };
         final HashMap<String, ContentType> map = new HashMap<String, ContentType>();
-        for (ContentType contentType: contentTypes) {
+        for (final ContentType contentType: contentTypes) {
             map.put(contentType.getMimeType(), contentType);
         }
         CONTENT_TYPE_MAP = Collections.unmodifiableMap(map);

Modified: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java?rev=1788706&r1=1788705&r2=1788706&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
(original)
+++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
Sun Mar 26 02:26:35 2017
@@ -229,7 +229,7 @@ public abstract class AbstractConnPool<T
             public E get() throws InterruptedException, ExecutionException {
                 try {
                     return get(0L, TimeUnit.MILLISECONDS);
-                } catch (TimeoutException ex) {
+                } catch (final TimeoutException ex) {
                     throw new ExecutionException(ex);
                 }
             }
@@ -261,7 +261,7 @@ public abstract class AbstractConnPool<T
                             }
                             return leasedEntry;
                         }
-                    } catch (IOException ex) {
+                    } catch (final IOException ex) {
                         done.set(true);
                         if (callback != null) {
                             callback.failed(ex);



Mime
View raw message