hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject [21/42] httpcomponents-core git commit: Use final.
Date Thu, 11 May 2017 18:17:56 GMT
Use final.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.4.x@1788706
13f79535-47bb-0310-9956-ffa450edef68


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

Branch: refs/heads/4.4.x
Commit: ca149f0944800e328d2ae1b972720b7d970d95e6
Parents: c069b86
Author: Gary D. Gregory <ggregory@apache.org>
Authored: Sun Mar 26 02:26:35 2017 +0000
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Thu May 11 20:16:43 2017 +0200

----------------------------------------------------------------------
 .../org/apache/http/nio/pool/AbstractNIOConnPool.java     |  2 +-
 .../org/apache/http/nio/reactor/ssl/SSLIOSession.java     |  2 +-
 .../org/apache/http/impl/nio/codecs/TestChunkDecoder.java |  8 ++++----
 .../http/impl/nio/reactor/TestSessionInOutBuffers.java    |  4 ++--
 .../nio/integration/TestClientOutOfSequenceResponse.java  |  2 +-
 .../nio/integration/TestHttpAsyncHandlersPipelining.java  | 10 +++++-----
 .../org/apache/http/nio/testserver/HttpClientNio.java     |  2 +-
 .../src/main/java/org/apache/http/entity/ContentType.java |  2 +-
 .../main/java/org/apache/http/pool/AbstractConnPool.java  |  4 ++--
 9 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/ca149f09/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
b/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
index 603b71d..77824b4 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/pool/AbstractNIOConnPool.java
@@ -691,7 +691,7 @@ public abstract class AbstractNIOConnPool<T, C, E extends PoolEntry<T,
C>>
         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++;
                 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/ca149f09/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
b/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
index a84d1ff..e47cf11 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
@@ -637,7 +637,7 @@ public class SSLIOSession implements IOSession, SessionBufferStatus, SocketAcces
         this.sslEngine.closeOutbound();
         try {
             updateEventMask();
-        } catch (CancelledKeyException ex) {
+        } catch (final CancelledKeyException ex) {
             shutdown();
         }
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/ca149f09/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
index 97bf84e..40ecabe 100644
--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
+++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
@@ -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) {
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/ca149f09/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
b/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
index b9df858..89f6c54 100644
--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
+++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java
@@ -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) {
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/ca149f09/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java
b/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java
index 52edb53..ff87f20 100644
--- a/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java
+++ b/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestClientOutOfSequenceResponse.java
@@ -99,7 +99,7 @@ public class TestClientOutOfSequenceResponse {
         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);
         }
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/ca149f09/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
b/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
index 9a02593..a4c2586 100644
--- a/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
+++ b/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlersPipelining.java
@@ -169,7 +169,7 @@ public class TestHttpAsyncHandlersPipelining extends HttpCoreNIOTestBase
{
             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 TestHttpAsyncHandlersPipelining extends HttpCoreNIOTestBase
{
             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 TestHttpAsyncHandlersPipelining extends HttpCoreNIOTestBase
{
             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 TestHttpAsyncHandlersPipelining extends HttpCoreNIOTestBase
{
             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 TestHttpAsyncHandlersPipelining extends HttpCoreNIOTestBase
{
             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);
             }

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/ca149f09/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
b/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
index 8a2f13d..3e46a57 100644
--- a/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
+++ b/httpcore-nio/src/test/java/org/apache/http/nio/testserver/HttpClientNio.java
@@ -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());
         }

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/ca149f09/httpcore/src/main/java/org/apache/http/entity/ContentType.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/entity/ContentType.java b/httpcore/src/main/java/org/apache/http/entity/ContentType.java
index 122d17f..4491e56 100644
--- a/httpcore/src/main/java/org/apache/http/entity/ContentType.java
+++ b/httpcore/src/main/java/org/apache/http/entity/ContentType.java
@@ -110,7 +110,7 @@ public final class ContentType implements Serializable {
             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);

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/ca149f09/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java b/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
index 25a6bfc..6e09832 100644
--- a/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
+++ b/httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
@@ -229,7 +229,7 @@ public abstract class AbstractConnPool<T, C, E extends PoolEntry<T,
C>>
             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, C, E extends PoolEntry<T,
C>>
                             }
                             return leasedEntry;
                         }
-                    } catch (IOException ex) {
+                    } catch (final IOException ex) {
                         done.set(true);
                         if (callback != null) {
                             callback.failed(ex);


Mime
View raw message