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 2016/01/27 10:02:42 UTC
svn commit: r1726969 - in /httpcomponents:
benchmark/httpcore/trunk/src/main/java/org/apache/http/benchmark/netty/
httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/
httpasyncclient/trunk/httpasyncclient-cache/...
Author: ggregory
Date: Wed Jan 27 09:02:41 2016
New Revision: 1726969
URL: http://svn.apache.org/viewvc?rev=1726969&view=rev
Log:
Add final modifier to local variables.
Modified:
httpcomponents/benchmark/httpcore/trunk/src/main/java/org/apache/http/benchmark/netty/RandomDataHandler.java
httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java
httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/CachingHttpAsyncClientExecChain.java
httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/ClientExecChainAsyncClient.java
httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/CloseableHttpAsyncClientBase.java
httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java
httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPipelining.java
httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java
httpcomponents/httpclient/trunk/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java
httpcomponents/httpclient/trunk/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/MimeExportedIT.java
httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WinHttpClients.java
httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WindowsNegotiateScheme.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/auth/util/ByteArrayBuilder.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FormBodyPartBuilder.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/BasicResponseHandler.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicAuthCache.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicScheme.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/DigestScheme.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/GGSSchemeBase.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/AbstractCookieSpec.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/LaxExpiresHandler.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LenientHttpResponseParser.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingInputStream.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingOutputStream.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/DefaultServiceUnavailableRetryStrategy.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/IdleConnectionEvictor.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/methods/RequestBuilder.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcher.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcherLoader.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URIUtils.java
httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URLEncodedUtils.java
httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/entity/TestGZip.java
httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/ssl/TestDefaultHostnameVerifier.java
httpcomponents/httpcore/trunk/httpcore5-osgi/src/test/java/org/apache/hc/core5/http/osgi/Common.java
Modified: httpcomponents/benchmark/httpcore/trunk/src/main/java/org/apache/http/benchmark/netty/RandomDataHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/benchmark/httpcore/trunk/src/main/java/org/apache/http/benchmark/netty/RandomDataHandler.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/benchmark/httpcore/trunk/src/main/java/org/apache/http/benchmark/netty/RandomDataHandler.java (original)
+++ httpcomponents/benchmark/httpcore/trunk/src/main/java/org/apache/http/benchmark/netty/RandomDataHandler.java Wed Jan 27 09:02:41 2016
@@ -64,17 +64,17 @@ class RandomDataHandler extends SimpleCh
public void messageReceived(final ChannelHandlerContext ctx, final MessageEvent e) throws Exception {
count = 100;
if (!readingChunks) {
- HttpRequest request = this.request = (HttpRequest) e.getMessage();
- String target = request.getUri();
+ final HttpRequest request = this.request = (HttpRequest) e.getMessage();
+ final String target = request.getUri();
- int idx = target.indexOf('?');
+ final int idx = target.indexOf('?');
if (idx != -1) {
String s = target.substring(idx + 1);
if (s.startsWith("c=")) {
s = s.substring(2);
try {
count = Integer.parseInt(s);
- } catch (NumberFormatException ex) {
+ } catch (final NumberFormatException ex) {
writeError(e, HttpResponseStatus.BAD_REQUEST, ex.getMessage());
return;
}
@@ -91,7 +91,7 @@ class RandomDataHandler extends SimpleCh
writeResponse(e);
}
} else {
- HttpChunk chunk = (HttpChunk) e.getMessage();
+ final HttpChunk chunk = (HttpChunk) e.getMessage();
if (chunk.isLast()) {
readingChunks = false;
writeResponse(e);
@@ -101,10 +101,10 @@ class RandomDataHandler extends SimpleCh
private void writeError(final MessageEvent e, final HttpResponseStatus status, final String message) {
// Decide whether to close the connection or not.
- boolean keepAlive = isKeepAlive(request);
+ final boolean keepAlive = isKeepAlive(request);
// Build the response object.
- HttpResponse response = new DefaultHttpResponse(HTTP_1_1, status);
+ final HttpResponse response = new DefaultHttpResponse(HTTP_1_1, status);
response.setContent(ChannelBuffers.copiedBuffer(message, CharsetUtil.UTF_8));
response.setHeader(CONTENT_TYPE, "text/plain; charset=UTF-8");
@@ -117,7 +117,7 @@ class RandomDataHandler extends SimpleCh
}
// Write the response.
- ChannelFuture future = e.getChannel().write(response);
+ final ChannelFuture future = e.getChannel().write(response);
// Close the non-keep-alive connection after the write operation is done.
if (!keepAlive) {
@@ -127,13 +127,13 @@ class RandomDataHandler extends SimpleCh
private void writeResponse(final MessageEvent e) {
// Decide whether to close the connection or not.
- boolean keepAlive = isKeepAlive(request);
+ final boolean keepAlive = isKeepAlive(request);
// Build the response object.
- HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK);
+ final HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK);
- byte[] buf = new byte[count];
- int r = Math.abs(buf.hashCode());
+ final byte[] buf = new byte[count];
+ final int r = Math.abs(buf.hashCode());
for (int i = 0; i < count; i++) {
buf[i] = (byte) ((r + i) % 96 + 32);
}
@@ -149,7 +149,7 @@ class RandomDataHandler extends SimpleCh
}
// Write the response.
- ChannelFuture future = e.getChannel().write(response);
+ final ChannelFuture future = e.getChannel().write(response);
// Close the non-keep-alive connection after the write operation is done.
if (!keepAlive) {
@@ -158,7 +158,7 @@ class RandomDataHandler extends SimpleCh
}
private static void send100Continue(final MessageEvent e) {
- HttpResponse response = new DefaultHttpResponse(HTTP_1_1, CONTINUE);
+ final HttpResponse response = new DefaultHttpResponse(HTTP_1_1, CONTINUE);
e.getChannel().write(response);
}
Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java Wed Jan 27 09:02:41 2016
@@ -94,9 +94,9 @@ class AsynchronousAsyncValidationRequest
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);
Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/CachingHttpAsyncClientExecChain.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/CachingHttpAsyncClientExecChain.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/CachingHttpAsyncClientExecChain.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/CachingHttpAsyncClientExecChain.java Wed Jan 27 09:02:41 2016
@@ -100,21 +100,21 @@ public class CachingHttpAsyncClientExecC
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);
}
}
Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/ClientExecChainAsyncClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/ClientExecChainAsyncClient.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/ClientExecChainAsyncClient.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/test/java/org/apache/http/impl/client/cache/ClientExecChainAsyncClient.java Wed Jan 27 09:02:41 2016
@@ -111,9 +111,9 @@ public class ClientExecChainAsyncClient
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;
Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/CloseableHttpAsyncClientBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/CloseableHttpAsyncClientBase.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/CloseableHttpAsyncClientBase.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/CloseableHttpAsyncClientBase.java Wed Jan 27 09:02:41 2016
@@ -97,7 +97,7 @@ abstract class CloseableHttpAsyncClientB
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 {
Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java Wed Jan 27 09:02:41 2016
@@ -113,7 +113,7 @@ class PipeliningClientExchangeHandlerImp
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 @@ class PipeliningClientExchangeHandlerImp
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 @@ class PipeliningClientExchangeHandlerImp
requestProducer.requestCompleted(this.localContext);
try {
requestProducer.close();
- } catch (IOException ioex) {
+ } catch (final IOException ioex) {
this.log.debug(ioex.getMessage(), ioex);
}
}
@@ -293,7 +293,7 @@ class PipeliningClientExchangeHandlerImp
final Exception ex = responseConsumer.getException();
try {
responseConsumer.close();
- } catch (IOException ioex) {
+ } catch (final IOException ioex) {
this.log.debug(ioex.getMessage(), ioex);
}
if (result != null) {
Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPipelining.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPipelining.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPipelining.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPipelining.java Wed Jan 27 09:02:41 2016
@@ -210,7 +210,7 @@ public class TestHttpAsyncPipelining ext
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);
Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java (original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestHttpAsyncPrematureTermination.java Wed Jan 27 09:02:41 2016
@@ -305,7 +305,7 @@ public class TestHttpAsyncPrematureTermi
try {
future.get();
Assert.fail();
- } catch (ExecutionException e) {
+ } catch (final ExecutionException e) {
Assert.assertTrue(e.toString(), e.getCause() instanceof UnknownHostException);
}
this.connMgr.shutdown(1000);
Modified: httpcomponents/httpclient/trunk/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5-fluent/src/main/java/org/apache/hc/client5/http/fluent/Request.java Wed Jan 27 09:02:41 2016
@@ -311,7 +311,7 @@ public class Request {
public Request bodyForm(final Iterable <? extends NameValuePair> formParams, final Charset charset) {
final List<NameValuePair> paramList = new ArrayList<>();
- for (NameValuePair param : formParams) {
+ for (final NameValuePair param : formParams) {
paramList.add(param);
}
final ContentType contentType = ContentType.create(URLEncodedUtils.CONTENT_TYPE, charset);
Modified: httpcomponents/httpclient/trunk/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/MimeExportedIT.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/MimeExportedIT.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/MimeExportedIT.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5-osgi/src/test/java/org/apache/hc/client5/http/osgi/impl/MimeExportedIT.java Wed Jan 27 09:02:41 2016
@@ -72,10 +72,10 @@ public class MimeExportedIT {
return name.endsWith(".jar");
}
});
- for (File bundleFile : bundleFiles) {
+ for (final File bundleFile : bundleFiles) {
try {
bundleUrls.add(bundleFile.toURI().toURL().toExternalForm());
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
throw new RuntimeException(e);
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WinHttpClients.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WinHttpClients.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WinHttpClients.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WinHttpClients.java Wed Jan 27 09:02:41 2016
@@ -57,7 +57,7 @@ public class WinHttpClients {
if (os != null && os.contains("windows")) {
try {
return Sspi.MAX_TOKEN_SIZE > 0;
- } catch (Exception ignore) { // Likely ClassNotFound
+ } catch (final Exception ignore) { // Likely ClassNotFound
return false;
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WindowsNegotiateScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WindowsNegotiateScheme.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WindowsNegotiateScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5-win/src/main/java/org/apache/hc/client5/http/impl/win/WindowsNegotiateScheme.java Wed Jan 27 09:02:41 2016
@@ -198,7 +198,7 @@ public class WindowsNegotiateScheme impl
final String targetName = getServicePrincipalName(context);
response = getToken(null, null, targetName);
- } catch (RuntimeException ex) {
+ } catch (final RuntimeException ex) {
failAuthCleanup();
if (ex instanceof Win32Exception) {
throw new AuthenticationException("Authentication Failed", ex);
@@ -215,7 +215,7 @@ public class WindowsNegotiateScheme impl
Sspi.SECBUFFER_TOKEN, continueTokenBytes);
final String targetName = getServicePrincipalName(context);
response = getToken(this.sspiContext, continueTokenBuffer, targetName);
- } catch (RuntimeException ex) {
+ } catch (final RuntimeException ex) {
failAuthCleanup();
if (ex instanceof Win32Exception) {
throw new AuthenticationException("Authentication Failed", ex);
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/auth/util/ByteArrayBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/auth/util/ByteArrayBuilder.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/auth/util/ByteArrayBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/auth/util/ByteArrayBuilder.java Wed Jan 27 09:02:41 2016
@@ -109,7 +109,7 @@ public class ByteArrayBuilder {
this.charsetEncoder.reset();
try {
this.buffer = encode(this.buffer, charBuffer, this.charsetEncoder);
- } catch (CharacterCodingException ex) {
+ } catch (final CharacterCodingException ex) {
// Should never happen
throw new IllegalStateException("Unexpected character coding error", ex);
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FormBodyPartBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FormBodyPartBuilder.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FormBodyPartBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/FormBodyPartBuilder.java Wed Jan 27 09:02:41 2016
@@ -95,7 +95,7 @@ public class FormBodyPartBuilder {
Asserts.notNull(this.body, "Content body");
final Header headerCopy = new Header();
final List<MinimalField> fields = this.header.getFields();
- for (MinimalField field: fields) {
+ for (final MinimalField field: fields) {
headerCopy.addField(field);
}
if (headerCopy.getField(MIME.CONTENT_DISPOSITION) == null) {
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/BasicResponseHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/BasicResponseHandler.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/BasicResponseHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/BasicResponseHandler.java Wed Jan 27 09:02:41 2016
@@ -60,7 +60,7 @@ public class BasicResponseHandler extend
public String handleEntity(final HttpEntity entity) throws IOException {
try {
return EntityUtils.toString(entity);
- } catch (ParseException ex) {
+ } catch (final ParseException ex) {
throw new ClientProtocolException(ex);
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicAuthCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicAuthCache.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicAuthCache.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicAuthCache.java Wed Jan 27 09:02:41 2016
@@ -106,7 +106,7 @@ public class BasicAuthCache implements A
out.writeObject(authScheme);
}
this.map.put(getKey(host), buf.toByteArray());
- } catch (IOException ex) {
+ } catch (final IOException ex) {
if (log.isWarnEnabled()) {
log.warn("Unexpected I/O error while serializing auth scheme", ex);
}
@@ -128,12 +128,12 @@ public class BasicAuthCache implements A
try (final ObjectInputStream in = new ObjectInputStream(buf)) {
return (AuthScheme) in.readObject();
}
- } catch (IOException ex) {
+ } catch (final IOException ex) {
if (log.isWarnEnabled()) {
log.warn("Unexpected I/O error while de-serializing auth scheme", ex);
}
return null;
- } catch (ClassNotFoundException ex) {
+ } catch (final ClassNotFoundException ex) {
if (log.isWarnEnabled()) {
log.warn("Unexpected error while de-serializing auth scheme", ex);
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicScheme.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/BasicScheme.java Wed Jan 27 09:02:41 2016
@@ -119,7 +119,7 @@ public class BasicScheme implements Auth
this.paramMap.clear();
final List<NameValuePair> params = authChallenge.getParams();
if (params != null) {
- for (NameValuePair param: params) {
+ for (final NameValuePair param: params) {
this.paramMap.put(param.getName().toLowerCase(Locale.ROOT), param.getValue());
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/DigestScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/DigestScheme.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/DigestScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/DigestScheme.java Wed Jan 27 09:02:41 2016
@@ -147,7 +147,7 @@ public class DigestScheme implements Aut
this.paramMap.clear();
final List<NameValuePair> params = authChallenge.getParams();
if (params != null) {
- for (NameValuePair param: params) {
+ for (final NameValuePair param: params) {
this.paramMap.put(param.getName().toLowerCase(Locale.ROOT), param.getValue());
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/GGSSchemeBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/GGSSchemeBase.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/GGSSchemeBase.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/GGSSchemeBase.java Wed Jan 27 09:02:41 2016
@@ -198,7 +198,7 @@ public abstract class GGSSchemeBase impl
if (this.useCanonicalHostname){
try {
hostname = dnsResolver.resolveCanonicalHostname(host.getHostName());
- } catch (UnknownHostException ignore){
+ } catch (final UnknownHostException ignore){
}
}
if (this.stripPort) {
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java Wed Jan 27 09:02:41 2016
@@ -138,7 +138,7 @@ public class HttpAuthenticator {
final Header[] headers = response.getHeaders(
challengeType == ChallengeType.PROXY ? HttpHeaders.PROXY_AUTHENTICATE : HttpHeaders.WWW_AUTHENTICATE);
final Map<String, AuthChallenge> challengeMap = new HashMap<>();
- for (Header header: headers) {
+ for (final Header header: headers) {
final CharArrayBuffer buffer;
final int pos;
if (header instanceof FormattedHeader) {
@@ -157,13 +157,13 @@ public class HttpAuthenticator {
final List<AuthChallenge> authChallenges;
try {
authChallenges = parser.parse(buffer, cursor);
- } catch (ParseException ex) {
+ } catch (final ParseException ex) {
if (this.log.isWarnEnabled()) {
this.log.warn("Malformed challenge: " + header.getValue());
}
continue;
}
- for (AuthChallenge authChallenge: authChallenges) {
+ for (final AuthChallenge authChallenge: authChallenges) {
final String scheme = authChallenge.getScheme().toLowerCase(Locale.ROOT);
if (!challengeMap.containsKey(scheme)) {
challengeMap.put(scheme, authChallenge);
@@ -195,7 +195,7 @@ public class HttpAuthenticator {
this.log.debug("Authorization challenge processed");
try {
authScheme.processChallenge(challenge, context);
- } catch (MalformedChallengeException ex) {
+ } catch (final MalformedChallengeException ex) {
if (this.log.isWarnEnabled()) {
this.log.warn(ex.getMessage());
}
@@ -226,7 +226,7 @@ public class HttpAuthenticator {
}
final Queue<AuthScheme> authOptions = new LinkedList<>();
- for (AuthScheme authScheme: preferredSchemes) {
+ for (final AuthScheme authScheme: preferredSchemes) {
try {
final String id = authScheme.getName();
final AuthChallenge challenge = challengeMap.get(id.toLowerCase(Locale.ROOT));
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/AbstractCookieSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/AbstractCookieSpec.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/AbstractCookieSpec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/AbstractCookieSpec.java Wed Jan 27 09:02:41 2016
@@ -77,7 +77,7 @@ public abstract class AbstractCookieSpec
protected AbstractCookieSpec(final CommonCookieAttributeHandler... handlers) {
super();
this.attribHandlerMap = new ConcurrentHashMap<>(handlers.length);
- for (CommonCookieAttributeHandler handler: handlers) {
+ for (final CommonCookieAttributeHandler handler: handlers) {
this.attribHandlerMap.put(handler.getAttributeName(), handler);
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/LaxExpiresHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/LaxExpiresHandler.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/LaxExpiresHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/LaxExpiresHandler.java Wed Jan 27 09:02:41 2016
@@ -153,7 +153,7 @@ public class LaxExpiresHandler extends A
}
}
}
- } catch (NumberFormatException ignore) {
+ } catch (final NumberFormatException ignore) {
throw new MalformedCookieException("Invalid 'expires' attribute: " + value);
}
if (!foundTime || !foundDayOfMonth || !foundMonth || !foundYear) {
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java Wed Jan 27 09:02:41 2016
@@ -83,7 +83,7 @@ public class RFC6265CookieSpec implement
super();
this.attribHandlers = handlers.clone();
this.attribHandlerMap = new ConcurrentHashMap<>(handlers.length);
- for (CommonCookieAttributeHandler handler: handlers) {
+ for (final CommonCookieAttributeHandler handler: handlers) {
this.attribHandlerMap.put(handler.getAttributeName().toLowerCase(Locale.ROOT), handler);
}
this.tokenParser = TokenParser.INSTANCE;
@@ -171,7 +171,7 @@ public class RFC6265CookieSpec implement
attribMap.remove(Cookie.EXPIRES_ATTR);
}
- for (Map.Entry<String, String> entry: attribMap.entrySet()) {
+ for (final Map.Entry<String, String> entry: attribMap.entrySet()) {
final String paramName = entry.getKey();
final String paramValue = entry.getValue();
final CookieAttributeHandler handler = this.attribHandlerMap.get(paramName);
@@ -247,7 +247,7 @@ public class RFC6265CookieSpec implement
final List<Header> headers = new ArrayList<>(1);
try {
headers.add(new BufferedHeader(buffer));
- } catch (ParseException ignore) {
+ } catch (final ParseException ignore) {
// should never happen
}
return headers;
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LenientHttpResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LenientHttpResponseParser.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LenientHttpResponseParser.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LenientHttpResponseParser.java Wed Jan 27 09:02:41 2016
@@ -84,7 +84,7 @@ public class LenientHttpResponseParser e
protected HttpResponse createMessage(final CharArrayBuffer buffer) throws IOException {
try {
return super.createMessage(buffer);
- } catch (HttpException ex) {
+ } catch (final HttpException ex) {
if (this.log.isDebugEnabled()) {
this.log.debug("Garbage in response: " + buffer.toString());
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingInputStream.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingInputStream.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingInputStream.java Wed Jan 27 09:02:41 2016
@@ -59,7 +59,7 @@ class LoggingInputStream extends InputSt
wire.input(b);
}
return b;
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.input("[read] I/O error: " + ex.getMessage());
throw ex;
}
@@ -75,7 +75,7 @@ class LoggingInputStream extends InputSt
wire.input(b, 0, bytesRead);
}
return bytesRead;
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.input("[read] I/O error: " + ex.getMessage());
throw ex;
}
@@ -91,7 +91,7 @@ class LoggingInputStream extends InputSt
wire.input(b, off, bytesRead);
}
return bytesRead;
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.input("[read] I/O error: " + ex.getMessage());
throw ex;
}
@@ -101,7 +101,7 @@ class LoggingInputStream extends InputSt
public long skip(final long n) throws IOException {
try {
return super.skip(n);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.input("[skip] I/O error: " + ex.getMessage());
throw ex;
}
@@ -111,7 +111,7 @@ class LoggingInputStream extends InputSt
public int available() throws IOException {
try {
return in.available();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.input("[available] I/O error : " + ex.getMessage());
throw ex;
}
@@ -136,7 +136,7 @@ class LoggingInputStream extends InputSt
public void close() throws IOException {
try {
in.close();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.input("[close] I/O error: " + ex.getMessage());
throw ex;
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingOutputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingOutputStream.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingOutputStream.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/LoggingOutputStream.java Wed Jan 27 09:02:41 2016
@@ -53,7 +53,7 @@ class LoggingOutputStream extends Output
public void write(final int b) throws IOException {
try {
wire.output(b);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.output("[write] I/O error: " + ex.getMessage());
throw ex;
}
@@ -64,7 +64,7 @@ class LoggingOutputStream extends Output
try {
wire.output(b);
out.write(b);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.output("[write] I/O error: " + ex.getMessage());
throw ex;
}
@@ -75,7 +75,7 @@ class LoggingOutputStream extends Output
try {
wire.output(b, off, len);
out.write(b, off, len);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.output("[write] I/O error: " + ex.getMessage());
throw ex;
}
@@ -85,7 +85,7 @@ class LoggingOutputStream extends Output
public void flush() throws IOException {
try {
out.flush();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.output("[flush] I/O error: " + ex.getMessage());
throw ex;
}
@@ -95,7 +95,7 @@ class LoggingOutputStream extends Output
public void close() throws IOException {
try {
out.close();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
wire.output("[close] I/O error: " + ex.getMessage());
throw ex;
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/DefaultServiceUnavailableRetryStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/DefaultServiceUnavailableRetryStrategy.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/DefaultServiceUnavailableRetryStrategy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/DefaultServiceUnavailableRetryStrategy.java Wed Jan 27 09:02:41 2016
@@ -86,7 +86,7 @@ public class DefaultServiceUnavailableRe
final String value = header.getValue();
try {
return Long.parseLong(value) * 1000;
- } catch (NumberFormatException ignore) {
+ } catch (final NumberFormatException ignore) {
final Date date = DateUtils.parseDate(value);
if (date != null) {
final long n = date.getTime() - System.currentTimeMillis();
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/HttpClientBuilder.java Wed Jan 27 09:02:41 2016
@@ -1051,7 +1051,7 @@ public class HttpClientBuilder {
if (!contentCompressionDisabled) {
if (contentDecoderMap != null) {
final RegistryBuilder<InputStreamFactory> b2 = RegistryBuilder.create();
- for (Map.Entry<String, InputStreamFactory> entry: contentDecoderMap.entrySet()) {
+ for (final Map.Entry<String, InputStreamFactory> entry: contentDecoderMap.entrySet()) {
b2.register(entry.getKey(), entry.getValue());
}
b.add(new ResponseContentEncoding(b2.build()));
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/IdleConnectionEvictor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/IdleConnectionEvictor.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/IdleConnectionEvictor.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/IdleConnectionEvictor.java Wed Jan 27 09:02:41 2016
@@ -69,7 +69,7 @@ public final class IdleConnectionEvictor
connectionManager.closeIdleConnections(maxIdleTimeMs, TimeUnit.MILLISECONDS);
}
}
- } catch (Exception ex) {
+ } catch (final Exception ex) {
exception = ex;
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/methods/RequestBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/methods/RequestBuilder.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/methods/RequestBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/methods/RequestBuilder.java Wed Jan 27 09:02:41 2016
@@ -282,7 +282,7 @@ public class RequestBuilder {
if (!formParams.isEmpty()) {
parameters = formParams;
}
- } catch (IOException ignore) {
+ } catch (final IOException ignore) {
}
} else {
entity = originalEntity;
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcher.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcher.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcher.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcher.java Wed Jan 27 09:02:41 2016
@@ -64,12 +64,12 @@ public final class PublicSuffixMatcher {
Args.notNull(domainType, "Domain type");
Args.notNull(rules, "Domain suffix rules");
this.rules = new ConcurrentHashMap<>(rules.size());
- for (String rule: rules) {
+ for (final String rule: rules) {
this.rules.put(rule, domainType);
}
this.exceptions = new ConcurrentHashMap<>();
if (exceptions != null) {
- for (String exception: exceptions) {
+ for (final String exception: exceptions) {
this.exceptions.put(exception, domainType);
}
}
@@ -82,15 +82,15 @@ public final class PublicSuffixMatcher {
Args.notNull(lists, "Domain suffix lists");
this.rules = new ConcurrentHashMap<>();
this.exceptions = new ConcurrentHashMap<>();
- for (PublicSuffixList list: lists) {
+ for (final PublicSuffixList list: lists) {
final DomainType domainType = list.getType();
final List<String> rules = list.getRules();
- for (String rule: rules) {
+ for (final String rule: rules) {
this.rules.put(rule, domainType);
}
final List<String> exceptions = list.getExceptions();
if (exceptions != null) {
- for (String exception: exceptions) {
+ for (final String exception: exceptions) {
this.exceptions.put(exception, domainType);
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcherLoader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcherLoader.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcherLoader.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/psl/PublicSuffixMatcherLoader.java Wed Jan 27 09:02:41 2016
@@ -80,7 +80,7 @@ public final class PublicSuffixMatcherLo
if (url != null) {
try {
DEFAULT_INSTANCE = load(url);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
// Should never happen
final Log log = LogFactory.getLog(PublicSuffixMatcherLoader.class);
if (log.isWarnEnabled()) {
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java Wed Jan 27 09:02:41 2016
@@ -267,7 +267,7 @@ public final class DefaultHostnameVerifi
}
}
return null;
- } catch (InvalidNameException e) {
+ } catch (final InvalidNameException e) {
throw new SSLException(subjectPrincipal + " is not a valid X500 distinguished name");
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java Wed Jan 27 09:02:41 2016
@@ -309,7 +309,7 @@ public class SSLConnectionSocketFactory
// If supported protocols are not explicitly set, remove all SSL protocol versions
final String[] allProtocols = sslsock.getEnabledProtocols();
final List<String> enabledProtocols = new ArrayList<>(allProtocols.length);
- for (String protocol: allProtocols) {
+ for (final String protocol: allProtocols) {
if (!protocol.startsWith("SSL")) {
enabledProtocols.add(protocol);
}
@@ -392,7 +392,7 @@ public class SSLConnectionSocketFactory
}
this.log.debug(" issuer alternative names: " + altNames);
}
- } catch (Exception ignore) {
+ } catch (final Exception ignore) {
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URIUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URIUtils.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URIUtils.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URIUtils.java Wed Jan 27 09:02:41 2016
@@ -205,7 +205,7 @@ public class URIUtils {
}
try {
return normalizeSyntax(resolved);
- } catch (URISyntaxException ex) {
+ } catch (final URISyntaxException ex) {
throw new IllegalArgumentException(ex);
}
}
@@ -316,7 +316,7 @@ public class URIUtils {
if (!TextUtils.isBlank(host)) {
try {
target = new HttpHost(host, port, scheme);
- } catch (IllegalArgumentException ignore) {
+ } catch (final IllegalArgumentException ignore) {
}
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URLEncodedUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URLEncodedUtils.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URLEncodedUtils.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/utils/URLEncodedUtils.java Wed Jan 27 09:02:41 2016
@@ -204,7 +204,7 @@ public class URLEncodedUtils {
Args.notNull(buf, "Char array buffer");
final TokenParser tokenParser = TokenParser.INSTANCE;
final BitSet delimSet = new BitSet();
- for (char separator: separators) {
+ for (final char separator: separators) {
delimSet.set(separator);
}
final ParserCursor cursor = new ParserCursor(0, buf.length());
Modified: httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/entity/TestGZip.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/entity/TestGZip.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/entity/TestGZip.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/entity/TestGZip.java Wed Jan 27 09:02:41 2016
@@ -74,7 +74,7 @@ public class TestGZip {
final OutputStream out = Mockito.mock(OutputStream.class);
try {
gzipe.writeTo(out);
- } catch (IOException ex) {
+ } catch (final IOException ex) {
Mockito.verify(out, Mockito.never()).close();
}
}
Modified: httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/ssl/TestDefaultHostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/ssl/TestDefaultHostnameVerifier.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/ssl/TestDefaultHostnameVerifier.java (original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/test/java/org/apache/hc/client5/http/ssl/TestDefaultHostnameVerifier.java Wed Jan 27 09:02:41 2016
@@ -264,7 +264,7 @@ public class TestDefaultHostnameVerifier
try {
DefaultHostnameVerifier.matchIPv6Address(host1, Arrays.asList("2001:0db8:aaaa:bbbb:cccc::10"));
Assert.fail("SSLException expected");
- } catch (SSLException expected) {
+ } catch (final SSLException expected) {
}
final String host2 = "2001:0db8:aaaa:bbbb:cccc::1";
DefaultHostnameVerifier.matchIPv6Address(host2, Arrays.asList("2001:0db8:aaaa:bbbb:cccc:0:0:0001"));
@@ -272,7 +272,7 @@ public class TestDefaultHostnameVerifier
try {
DefaultHostnameVerifier.matchIPv6Address(host2, Arrays.asList("2001:0db8:aaaa:bbbb:cccc::10"));
Assert.fail("SSLException expected");
- } catch (SSLException expected) {
+ } catch (final SSLException expected) {
}
}
@@ -289,12 +289,12 @@ public class TestDefaultHostnameVerifier
try {
DefaultHostnameVerifier.extractCN("blah,blah");
Assert.fail("SSLException expected");
- } catch (SSLException expected) {
+ } catch (final SSLException expected) {
}
try {
DefaultHostnameVerifier.extractCN("cn,o=blah");
Assert.fail("SSLException expected");
- } catch (SSLException expected) {
+ } catch (final SSLException expected) {
}
}
Modified: httpcomponents/httpcore/trunk/httpcore5-osgi/src/test/java/org/apache/hc/core5/http/osgi/Common.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-osgi/src/test/java/org/apache/hc/core5/http/osgi/Common.java?rev=1726969&r1=1726968&r2=1726969&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-osgi/src/test/java/org/apache/hc/core5/http/osgi/Common.java (original)
+++ httpcomponents/httpcore/trunk/httpcore5-osgi/src/test/java/org/apache/hc/core5/http/osgi/Common.java Wed Jan 27 09:02:41 2016
@@ -58,7 +58,7 @@ public class Common {
final Properties depProps = new Properties();
try {
depProps.load(depPropsUrl.openStream());
- } catch (IOException e) {
+ } catch (final IOException e) {
throw new RuntimeException(e);
}
String ver = (String) depProps.get(String.format("%s/%s/version", groupId, artifactId));