Add final modifier to local variables.
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpasyncclient/trunk@1726969 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java b/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java
index 71933d8..692440f 100644
--- a/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java
+++ b/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java
@@ -94,9 +94,9 @@
future.get();
} catch (final ProtocolException pe) {
this.log.error("ProtocolException thrown during asynchronous revalidation", pe);
- } catch (ExecutionException e) {
+ } catch (final ExecutionException e) {
this.log.error("Exception thrown during asynchronous revalidation", e.getCause());
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
Thread.currentThread().interrupt();
} finally {
this.parent.markComplete(this.identifier);
diff --git a/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/CachingHttpAsyncClientExecChain.java b/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/CachingHttpAsyncClientExecChain.java
index 145ad57..23000f4 100644
--- a/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/CachingHttpAsyncClientExecChain.java
+++ b/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/CachingHttpAsyncClientExecChain.java
@@ -100,21 +100,21 @@
try {
final Future<HttpResponse> future = client.execute(route.getTargetHost(), request, context, null);
return Proxies.enhanceResponse(future.get());
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
Thread.currentThread().interrupt();
return null;
- } catch (ExecutionException e) {
+ } catch (final ExecutionException e) {
try {
throw e.getCause();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
throw ex;
- } catch (HttpException ex) {
+ } catch (final HttpException ex) {
throw ex;
- } catch (RuntimeException ex) {
+ } catch (final RuntimeException ex) {
throw ex;
- } catch (Error ex) {
+ } catch (final Error ex) {
throw ex;
- } catch (Throwable ex) {
+ } catch (final Throwable ex) {
throw new UndeclaredThrowableException(ex);
}
}
diff --git a/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/ClientExecChainAsyncClient.java b/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/ClientExecChainAsyncClient.java
index adb9041..5e6d451 100644
--- a/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/ClientExecChainAsyncClient.java
+++ b/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/ClientExecChainAsyncClient.java
@@ -111,9 +111,9 @@
HttpRequestWrapper.wrap(request),
HttpClientContext.adapt(context), null);
future.completed(result);
- } catch (IOException e) {
+ } catch (final IOException e) {
future.failed(e);
- } catch (HttpException e) {
+ } catch (final HttpException e) {
future.failed(e);
}
return future;
diff --git a/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/CloseableHttpAsyncClientBase.java b/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/CloseableHttpAsyncClientBase.java
index ef12d16..5c12ce3 100644
--- a/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/CloseableHttpAsyncClientBase.java
+++ b/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/CloseableHttpAsyncClientBase.java
@@ -97,7 +97,7 @@
if (this.reactorThread != null) {
try {
this.connmgr.shutdown();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
this.log.error("I/O error shutting down connection manager", ex);
}
try {
diff --git a/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java b/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java
index 7756938..19027ba 100644
--- a/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java
+++ b/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java
@@ -113,7 +113,7 @@
if (requestProducer != null) {
try {
requestProducer.close();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
this.log.debug("I/O error closing request producer", ex);
}
}
@@ -123,7 +123,7 @@
if (responseConsumer != null) {
try {
responseConsumer.close();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
this.log.debug("I/O error closing response consumer", ex);
}
}
@@ -236,7 +236,7 @@
requestProducer.requestCompleted(this.localContext);
try {
requestProducer.close();
- } catch (IOException ioex) {
+ } catch (final IOException ioex) {
this.log.debug(ioex.getMessage(), ioex);
}
}
@@ -293,7 +293,7 @@
final Exception ex = responseConsumer.getException();
try {
responseConsumer.close();
- } catch (IOException ioex) {
+ } catch (final IOException ioex) {
this.log.debug(ioex.getMessage(), ioex);
}
if (result != null) {
diff --git a/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPipelining.java b/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPipelining.java
index bf17fca..04d80b2 100644
--- a/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPipelining.java
+++ b/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPipelining.java
@@ -210,7 +210,7 @@
null, null);
try {
future.get();
- } catch (ExecutionException ex) {
+ } catch (final ExecutionException ex) {
final Throwable cause = ex.getCause();
Assert.assertNotNull(cause);
Assert.assertTrue(cause instanceof ConnectionClosedException);
diff --git a/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java b/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java
index 34fad27..1977e27 100644
--- a/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java
+++ b/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java
@@ -305,7 +305,7 @@
try {
future.get();
Assert.fail();
- } catch (ExecutionException e) {
+ } catch (final ExecutionException e) {
Assert.assertTrue(e.toString(), e.getCause() instanceof UnknownHostException);
}
this.connMgr.shutdown(1000);