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 2017/05/08 20:31:36 UTC
svn commit: r1794452 -
/httpcomponents/httpclient/branches/4.5.x/httpclient-win/src/test/java/org/apache/http/impl/auth/win/TestWindowsNegotiateScheme.java
Author: ggregory
Date: Mon May 8 20:31:36 2017
New Revision: 1794452
URL: http://svn.apache.org/viewvc?rev=1794452&view=rev
Log:
Add missing close() call.
Modified:
httpcomponents/httpclient/branches/4.5.x/httpclient-win/src/test/java/org/apache/http/impl/auth/win/TestWindowsNegotiateScheme.java
Modified: httpcomponents/httpclient/branches/4.5.x/httpclient-win/src/test/java/org/apache/http/impl/auth/win/TestWindowsNegotiateScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient-win/src/test/java/org/apache/http/impl/auth/win/TestWindowsNegotiateScheme.java?rev=1794452&r1=1794451&r2=1794452&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient-win/src/test/java/org/apache/http/impl/auth/win/TestWindowsNegotiateScheme.java (original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient-win/src/test/java/org/apache/http/impl/auth/win/TestWindowsNegotiateScheme.java Mon May 8 20:31:36 2017
@@ -110,14 +110,17 @@ public class TestWindowsNegotiateScheme
final CloseableHttpClient customClient = HttpClientBuilder.create()
.setDefaultCredentialsProvider(credsProvider)
.setDefaultAuthSchemeRegistry(authSchemeRegistry).build();
-
- final HttpHost target = start();
- final HttpGet httpGet = new HttpGet("/");
- final CloseableHttpResponse response = customClient.execute(target, httpGet);
try {
- EntityUtils.consume(response.getEntity());
- } finally {
- response.close();
+ final HttpHost target = start();
+ final HttpGet httpGet = new HttpGet("/");
+ final CloseableHttpResponse response = customClient.execute(target, httpGet);
+ try {
+ EntityUtils.consume(response.getEntity());
+ } finally {
+ response.close();
+ }
+ }finally {
+ customClient.close();
}
}