You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/11/01 21:36:04 UTC
[1/2] httpcomponents-client git commit: Fixed style check violations
(no functional changes)
Repository: httpcomponents-client
Updated Branches:
refs/heads/master a40307594 -> 668e1d04c
Fixed style check violations (no functional changes)
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/87865c5c
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/87865c5c
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/87865c5c
Branch: refs/heads/master
Commit: 87865c5cd5003d0762ccd8d646c30b51b8958ba7
Parents: a403075
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Wed Nov 1 22:30:52 2017 +0100
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Wed Nov 1 22:30:52 2017 +0100
----------------------------------------------------------------------
.../http/impl/cache/AsyncCachingExec.java | 2 +-
.../hc/client5/http/impl/cache/CachingExec.java | 2 +-
.../OSGI-INF/metatype/metatype.properties | 2 +-
.../testing/async/AsyncRandomHandler.java | 2 +-
.../client5/testing/classic/RandomHandler.java | 2 +-
.../HttpAsyncClientCompatibilityTest.java | 26 ++++++++++----------
.../external/HttpClientCompatibilityTest.java | 14 +++++------
.../hc/client5/testing/sync/TestRedirects.java | 2 +-
.../apache/hc/client5/http/StandardMethods.java | 4 +--
.../hc/client5/http/impl/AuthSupport.java | 2 +-
.../http/impl/async/AsyncExecRuntimeImpl.java | 2 +-
.../http/impl/async/AsyncRedirectExec.java | 2 +-
.../client5/http/impl/async/AsyncRetryExec.java | 2 +-
.../impl/async/InternalHttpAsyncClient.java | 2 +-
.../client5/http/impl/auth/CredSspScheme.java | 4 +--
.../http/impl/auth/HttpAuthenticator.java | 2 +-
.../client5/http/impl/auth/NTLMEngineImpl.java | 2 +-
.../auth/SystemDefaultCredentialsProvider.java | 2 +-
.../http/impl/classic/ResponseEntityProxy.java | 6 ++---
.../PoolingAsyncClientConnectionManager.java | 5 ++--
.../http/ssl/DefaultHostnameVerifier.java | 2 +-
.../org/apache/hc/client5/version.properties | 2 +-
.../http/impl/classic/TestMainClientExec.java | 2 +-
.../http/impl/classic/TestRedirectExec.java | 2 +-
24 files changed, 48 insertions(+), 47 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
index 36aedaa..2b4a8dc 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
@@ -156,7 +156,7 @@ public class AsyncCachingExec extends CachingExecBase implements AsyncExecChainH
final URIAuthority authority = request.getAuthority();
final String scheme = request.getScheme();
- final HttpHost target = authority != null ? new HttpHost(authority, scheme) : route.getTargetHost();;
+ final HttpHost target = authority != null ? new HttpHost(authority, scheme) : route.getTargetHost();
final String via = generateViaHeader(request);
// default response context
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java
index d5e06c5..83f74cb 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java
@@ -151,7 +151,7 @@ public class CachingExec extends CachingExecBase implements ExecChainHandler {
final URIAuthority authority = request.getAuthority();
final String scheme = request.getScheme();
- final HttpHost target = authority != null ? new HttpHost(authority, scheme) : route.getTargetHost();;
+ final HttpHost target = authority != null ? new HttpHost(authority, scheme) : route.getTargetHost();
final String via = generateViaHeader(request);
// default response context
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.properties
----------------------------------------------------------------------
diff --git a/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.properties b/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.properties
index a3360b9..888a023 100644
--- a/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.properties
+++ b/httpclient5-osgi/src/main/resources/OSGI-INF/metatype/metatype.properties
@@ -14,7 +14,7 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
-# under the License.
+# under the License.
#
proxyconfigurator.name = Apache HTTP Components Proxy Configurator
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java
index 9e44db3..57bb64d 100644
--- a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java
+++ b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java
@@ -90,7 +90,7 @@ public class AsyncRandomHandler implements AsyncServerExchangeHandler {
final URI uri;
try {
uri = request.getUri();
- } catch (URISyntaxException ex) {
+ } catch (final URISyntaxException ex) {
throw new ProtocolException(ex.getMessage(), ex);
}
final String path = uri.getPath();
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/classic/RandomHandler.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/classic/RandomHandler.java b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/classic/RandomHandler.java
index bd9fcde..e8d944d 100644
--- a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/classic/RandomHandler.java
+++ b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/classic/RandomHandler.java
@@ -80,7 +80,7 @@ public class RandomHandler implements HttpRequestHandler {
final URI uri;
try {
uri = request.getUri();
- } catch (URISyntaxException ex) {
+ } catch (final URISyntaxException ex) {
throw new ProtocolException(ex.getMessage(), ex);
}
final String path = uri.getPath();
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java
index 33e02ca..ea65327 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpAsyncClientCompatibilityTest.java
@@ -177,10 +177,10 @@ public class HttpAsyncClientCompatibilityTest {
} else {
logResult(TestResult.NOK, options, "(status " + code + ")");
}
- } catch (ExecutionException ex) {
+ } catch (final ExecutionException ex) {
final Throwable cause = ex.getCause();
logResult(TestResult.NOK, options, "(" + cause.getMessage() + ")");
- } catch (TimeoutException ex) {
+ } catch (final TimeoutException ex) {
logResult(TestResult.NOK, options, "(time out)");
}
}
@@ -191,7 +191,7 @@ public class HttpAsyncClientCompatibilityTest {
context.setCredentialsProvider(credentialsProvider);
final String[] requestUris = new String[] {"/", "/news.html", "/status.html"};
- for (String requestUri: requestUris) {
+ for (final String requestUri: requestUris) {
final SimpleHttpRequest httpGet = SimpleHttpRequest.get(target, requestUri);
final Future<SimpleHttpResponse> future = client.execute(httpGet, context, null);
try {
@@ -202,10 +202,10 @@ public class HttpAsyncClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGet, "(status " + code + ")");
}
- } catch (ExecutionException ex) {
+ } catch (final ExecutionException ex) {
final Throwable cause = ex.getCause();
logResult(TestResult.NOK, httpGet, "(" + cause.getMessage() + ")");
- } catch (TimeoutException ex) {
+ } catch (final TimeoutException ex) {
logResult(TestResult.NOK, httpGet, "(time out)");
}
}
@@ -229,10 +229,10 @@ public class HttpAsyncClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGetSecret, "(status " + code + ")");
}
- } catch (ExecutionException ex) {
+ } catch (final ExecutionException ex) {
final Throwable cause = ex.getCause();
logResult(TestResult.NOK, httpGetSecret, "(" + cause.getMessage() + ")");
- } catch (TimeoutException ex) {
+ } catch (final TimeoutException ex) {
logResult(TestResult.NOK, httpGetSecret, "(time out)");
}
}
@@ -255,10 +255,10 @@ public class HttpAsyncClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGetSecret, "(status " + code + ")");
}
- } catch (ExecutionException ex) {
+ } catch (final ExecutionException ex) {
final Throwable cause = ex.getCause();
logResult(TestResult.NOK, httpGetSecret, "(" + cause.getMessage() + ")");
- } catch (TimeoutException ex) {
+ } catch (final TimeoutException ex) {
logResult(TestResult.NOK, httpGetSecret, "(time out)");
}
}
@@ -281,10 +281,10 @@ public class HttpAsyncClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGetSecret, "(status " + code + ")");
}
- } catch (ExecutionException ex) {
+ } catch (final ExecutionException ex) {
final Throwable cause = ex.getCause();
logResult(TestResult.NOK, httpGetSecret, "(" + cause.getMessage() + ")");
- } catch (TimeoutException ex) {
+ } catch (final TimeoutException ex) {
logResult(TestResult.NOK, httpGetSecret, "(time out)");
}
}
@@ -309,10 +309,10 @@ public class HttpAsyncClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGetSecret, "(status " + code + ")");
}
- } catch (ExecutionException ex) {
+ } catch (final ExecutionException ex) {
final Throwable cause = ex.getCause();
logResult(TestResult.NOK, httpGetSecret, "(" + cause.getMessage() + ")");
- } catch (TimeoutException ex) {
+ } catch (final TimeoutException ex) {
logResult(TestResult.NOK, httpGetSecret, "(time out)");
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpClientCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpClientCompatibilityTest.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpClientCompatibilityTest.java
index bcaea20..f8c9ccd 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpClientCompatibilityTest.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/external/HttpClientCompatibilityTest.java
@@ -151,7 +151,7 @@ public class HttpClientCompatibilityTest {
} else {
logResult(TestResult.NOK, options, "(status " + code + ")");
}
- } catch (Exception ex) {
+ } catch (final Exception ex) {
logResult(TestResult.NOK, options, "(" + ex.getMessage() + ")");
}
}
@@ -161,7 +161,7 @@ public class HttpClientCompatibilityTest {
final HttpClientContext context = HttpClientContext.create();
context.setCredentialsProvider(credentialsProvider);
final String[] requestUris = new String[] {"/", "/news.html", "/status.html"};
- for (String requestUri: requestUris) {
+ for (final String requestUri: requestUris) {
final HttpGet httpGet = new HttpGet(requestUri);
try (ClassicHttpResponse response = client.execute(target, httpGet, context)) {
final int code = response.getCode();
@@ -171,7 +171,7 @@ public class HttpClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGet, "(status " + code + ")");
}
- } catch (Exception ex) {
+ } catch (final Exception ex) {
logResult(TestResult.NOK, httpGet, "(" + ex.getMessage() + ")");
}
}
@@ -194,7 +194,7 @@ public class HttpClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGetSecret, "(status " + code + ")");
}
- } catch (Exception ex) {
+ } catch (final Exception ex) {
logResult(TestResult.NOK, httpGetSecret, "(" + ex.getMessage() + ")");
}
}
@@ -216,7 +216,7 @@ public class HttpClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGetSecret, "(status " + code + ")");
}
- } catch (Exception ex) {
+ } catch (final Exception ex) {
logResult(TestResult.NOK, httpGetSecret, "(" + ex.getMessage() + ")");
}
}
@@ -238,7 +238,7 @@ public class HttpClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGetSecret, "(status " + code + ")");
}
- } catch (Exception ex) {
+ } catch (final Exception ex) {
logResult(TestResult.NOK, httpGetSecret, "(" + ex.getMessage() + ")");
}
}
@@ -261,7 +261,7 @@ public class HttpClientCompatibilityTest {
} else {
logResult(TestResult.NOK, httpGetSecret, "(status " + code + ")");
}
- } catch (Exception ex) {
+ } catch (final Exception ex) {
logResult(TestResult.NOK, httpGetSecret, "(" + ex.getMessage() + ")");
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestRedirects.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestRedirects.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestRedirects.java
index 08ff315..ab8ec57 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestRedirects.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestRedirects.java
@@ -101,7 +101,7 @@ public class TestRedirects extends LocalServerTestBase {
response.setCode(HttpStatus.SC_NOT_FOUND);
}
- } catch (URISyntaxException ex) {
+ } catch (final URISyntaxException ex) {
throw new ProtocolException(ex.getMessage(), ex);
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/StandardMethods.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/StandardMethods.java b/httpclient5/src/main/java/org/apache/hc/client5/http/StandardMethods.java
index cc90342..3ac5682 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/StandardMethods.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/StandardMethods.java
@@ -63,7 +63,7 @@ public enum StandardMethods {
}
try {
return valueOf(value.toUpperCase(Locale.ROOT)).safe;
- } catch (IllegalArgumentException ex) {
+ } catch (final IllegalArgumentException ex) {
return false;
}
}
@@ -74,7 +74,7 @@ public enum StandardMethods {
}
try {
return valueOf(value.toUpperCase(Locale.ROOT)).idempotent;
- } catch (IllegalArgumentException ex) {
+ } catch (final IllegalArgumentException ex) {
return false;
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/AuthSupport.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/AuthSupport.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/AuthSupport.java
index f2dae38..c53a5cd 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/AuthSupport.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/AuthSupport.java
@@ -73,7 +73,7 @@ public class AuthSupport {
Args.notNull(route, "Route");
final URIAuthority authority = request.getAuthority();
final String scheme = request.getScheme();
- final HttpHost target = authority != null ? new HttpHost(authority, scheme) : route.getTargetHost();;
+ final HttpHost target = authority != null ? new HttpHost(authority, scheme) : route.getTargetHost();
if (target.getPort() < 0) {
return new HttpHost(
target.getHostName(),
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncExecRuntimeImpl.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncExecRuntimeImpl.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncExecRuntimeImpl.java
index 8c90c35..1cbf8a6 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncExecRuntimeImpl.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncExecRuntimeImpl.java
@@ -248,7 +248,7 @@ class AsyncExecRuntimeImpl implements AsyncExecRuntime {
}
try {
endpoint.execute(exchangeHandler, context);
- } catch (RuntimeException ex) {
+ } catch (final RuntimeException ex) {
failed(ex);
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRedirectExec.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRedirectExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRedirectExec.java
index 0f13a07..3b29820 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRedirectExec.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRedirectExec.java
@@ -171,7 +171,7 @@ class AsyncRedirectExec implements AsyncExecChainHandler {
scope.execRuntime.releaseConnection();
}
internalExecute(state, chain, asyncExecCallback);
- } catch (IOException | HttpException ex) {
+ } catch (final IOException | HttpException ex) {
asyncExecCallback.failed(ex);
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRetryExec.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRetryExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRetryExec.java
index 82fc6f9..d08cc1f 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRetryExec.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncRetryExec.java
@@ -101,7 +101,7 @@ class AsyncRetryExec implements AsyncExecChainHandler {
scope.execRuntime.discardConnection();
internalExecute(execCount + 1, request, entityProducer, scope, chain, asyncExecCallback);
return;
- } catch (IOException | HttpException ex) {
+ } catch (final IOException | HttpException ex) {
log.error(ex.getMessage(), ex);
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncClient.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncClient.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncClient.java
index e1370e8..431111c 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncClient.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncClient.java
@@ -256,7 +256,7 @@ class InternalHttpAsyncClient extends AbstractHttpAsyncClientBase {
});
- } catch (HttpException | IOException ex) {
+ } catch (final HttpException | IOException ex) {
future.failed(ex);
}
return future;
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/CredSspScheme.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/CredSspScheme.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/CredSspScheme.java
index 5c8403d..e87685d 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/CredSspScheme.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/CredSspScheme.java
@@ -172,9 +172,9 @@ public class CredSspScheme implements AuthScheme
{
sslContext = SSLContexts.custom().build();
}
- catch ( NoSuchAlgorithmException | KeyManagementException e )
+ catch (final NoSuchAlgorithmException | KeyManagementException ex )
{
- throw new SSLInitializationException( "Error creating SSL Context: " + e.getMessage(), e );
+ throw new SSLInitializationException( "Error creating SSL Context: " + ex.getMessage(), ex );
}
final X509TrustManager tm = new X509TrustManager()
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java
index d2c7807..372f7e4 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/HttpAuthenticator.java
@@ -234,7 +234,7 @@ public class HttpAuthenticator {
if (authScheme.isResponseReady(host, credsProvider, context)) {
authOptions.add(authScheme);
}
- } catch (AuthenticationException | MalformedChallengeException ex) {
+ } catch (final AuthenticationException | MalformedChallengeException ex) {
if (this.log.isWarnEnabled()) {
this.log.warn(ex.getMessage());
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/NTLMEngineImpl.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/NTLMEngineImpl.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/NTLMEngineImpl.java
index 271c304..3ebb3dc 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/NTLMEngineImpl.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/NTLMEngineImpl.java
@@ -1812,7 +1812,7 @@ final class NTLMEngineImpl implements NTLMEngine {
final MessageDigest md5 = getMD5();
channelBindingsHash = md5.digest( channelBindingStruct );
}
- catch ( CertificateEncodingException | NoSuchAlgorithmException e )
+ catch (final CertificateEncodingException | NoSuchAlgorithmException e )
{
throw new NTLMEngineException( e.getMessage(), e );
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/SystemDefaultCredentialsProvider.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/SystemDefaultCredentialsProvider.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/SystemDefaultCredentialsProvider.java
index e0aa8bb..958644e 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/SystemDefaultCredentialsProvider.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/SystemDefaultCredentialsProvider.java
@@ -106,7 +106,7 @@ public class SystemDefaultCredentialsProvider implements CredentialsStore {
try {
final URI uri = request != null ? request.getUri() : null;
targetHostURL = uri != null ? uri.toURL() : null;
- } catch (URISyntaxException | MalformedURLException ignore) {
+ } catch (final URISyntaxException | MalformedURLException ignore) {
targetHostURL = null;
}
// use null addr, because the authentication fails if it does not exactly match the expected realm's host
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ResponseEntityProxy.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ResponseEntityProxy.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ResponseEntityProxy.java
index c521bdb..6dcdcad 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ResponseEntityProxy.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ResponseEntityProxy.java
@@ -98,7 +98,7 @@ class ResponseEntityProxy extends HttpEntityWrapper implements EofSensorWatcher
super.writeTo(outstream);
}
releaseConnection();
- } catch (IOException | RuntimeException ex) {
+ } catch (final IOException | RuntimeException ex) {
discardConnection();
throw ex;
} finally {
@@ -115,7 +115,7 @@ class ResponseEntityProxy extends HttpEntityWrapper implements EofSensorWatcher
wrapped.close();
}
releaseConnection();
- } catch (IOException | RuntimeException ex) {
+ } catch (final IOException | RuntimeException ex) {
discardConnection();
throw ex;
} finally {
@@ -140,7 +140,7 @@ class ResponseEntityProxy extends HttpEntityWrapper implements EofSensorWatcher
throw ex;
}
}
- } catch (IOException | RuntimeException ex) {
+ } catch (final IOException | RuntimeException ex) {
discardConnection();
throw ex;
} finally {
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java
index b393a65..1cad085 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java
@@ -233,8 +233,9 @@ public class PoolingAsyncClientConnectionManager implements AsyncClientConnectio
@Override
public void completed(final PoolEntry<HttpRoute, ManagedAsyncClientConnection> poolEntry) {
final ManagedAsyncClientConnection connection = poolEntry.getConnection();
- if (TimeValue.isPositive(validateAfterInactivity) && connection != null &&
- poolEntry.getUpdated() + validateAfterInactivity.toMillis() <= System.currentTimeMillis()) {
+ final TimeValue timeValue = PoolingAsyncClientConnectionManager.this.validateAfterInactivity;
+ if (TimeValue.isPositive(timeValue) && connection != null &&
+ poolEntry.getUpdated() + timeValue.toMillis() <= System.currentTimeMillis()) {
final ProtocolVersion protocolVersion = connection.getProtocolVersion();
if (HttpVersion.HTTP_2_0.greaterEquals(protocolVersion)) {
connection.submitPriorityCommand(new PingCommand(new BasicPingHandler(new Callback<Boolean>() {
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
index d4bbe0e..41c7383 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/DefaultHostnameVerifier.java
@@ -268,7 +268,7 @@ public final class DefaultHostnameVerifier implements HttpClientHostnameVerifier
if (value != null) {
return value.toString();
}
- } catch (NoSuchElementException | NamingException ignore) {
+ } catch (final NoSuchElementException | NamingException ignore) {
// ignore exception
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/main/resources/org/apache/hc/client5/version.properties
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/resources/org/apache/hc/client5/version.properties b/httpclient5/src/main/resources/org/apache/hc/client5/version.properties
index a57a828..842fb6b 100644
--- a/httpclient5/src/main/resources/org/apache/hc/client5/version.properties
+++ b/httpclient5/src/main/resources/org/apache/hc/client5/version.properties
@@ -14,7 +14,7 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
-# under the License.
+# under the License.
#
info.module = HttpClient
info.release = ${pom.version}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestMainClientExec.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestMainClientExec.java b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestMainClientExec.java
index bef2fa0..c59cd30 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestMainClientExec.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestMainClientExec.java
@@ -251,7 +251,7 @@ public class TestMainClientExec {
final ExecChain.Scope scope = new ExecChain.Scope("test", route, request, endpoint, context);
try {
mainClientExec.execute(request, scope, null);
- } catch (Exception ex) {
+ } catch (final Exception ex) {
Mockito.verify(endpoint).discardConnection();
throw ex;
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/87865c5c/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestRedirectExec.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestRedirectExec.java b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestRedirectExec.java
index 2339a89..7fdb4cc 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestRedirectExec.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestRedirectExec.java
@@ -336,7 +336,7 @@ public class TestRedirectExec {
public boolean matches(final ClassicHttpRequest argument) {
try {
return requestUri.equals(argument.getUri());
- } catch (URISyntaxException e) {
+ } catch (final URISyntaxException ex) {
return false;
}
}
[2/2] httpcomponents-client git commit: Upgraded HttpComponents
Parent to version 10
Posted by ol...@apache.org.
Upgraded HttpComponents Parent to version 10
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/668e1d04
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/668e1d04
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/668e1d04
Branch: refs/heads/master
Commit: 668e1d04ce30dc1b5e96cfb19145f2e864276beb
Parents: 87865c5
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Wed Nov 1 22:31:34 2017 +0100
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Wed Nov 1 22:31:34 2017 +0100
----------------------------------------------------------------------
pom.xml | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/668e1d04/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 19b7c66..634a1f6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-parent</artifactId>
- <version>9</version>
+ <version>10</version>
<relativePath>../httpcomponents-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -319,14 +319,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.9.1</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>hc-stylecheck</artifactId>
- <version>${hc.stylecheck.version}</version>
- </dependency>
- </dependencies>
<configuration>
<encoding>UTF-8</encoding>
</configuration>