Skip to content

Commit 1c0632e

Browse files
Hari Prasad KummariPaul Hohensee
authored andcommitted
8358048: java/net/httpclient/HttpsTunnelAuthTest.java incorrectly calls Thread::stop
Backport-of: d288ca28be7bfba3abe9f54cefbe53e73c25707e
1 parent e7fcc36 commit 1c0632e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/jdk/java/net/httpclient/HttpsTunnelAuthTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@
3737
import java.util.stream.Stream;
3838
import javax.net.ssl.SSLContext;
3939
import jdk.httpclient.test.lib.common.HttpServerAdapters;
40-
import jdk.httpclient.test.lib.http2.Http2TestServer;
4140
import jdk.test.lib.net.SimpleSSLContext;
4241

4342
import static java.lang.System.out;
4443

45-
/**
44+
/*
4645
* @test
4746
* @bug 8262027
4847
* @summary Verify that it's possible to handle proxy authentication manually
@@ -62,7 +61,7 @@
6261
//-Djdk.internal.httpclient.debug=true -Dtest.debug=true
6362
public class HttpsTunnelAuthTest implements HttpServerAdapters, AutoCloseable {
6463

65-
static final String data[] = {
64+
static final String[] data = {
6665
"Lorem ipsum",
6766
"dolor sit amet",
6867
"consectetur adipiscing elit, sed do eiusmod tempor",
@@ -150,7 +149,7 @@ void setUp() throws IOException {
150149

151150
@Override
152151
public void close() throws Exception {
153-
if (proxy != null) close(proxy::stop);
152+
if (proxy != null) close(proxy);
154153
if (http1Server != null) close(http1Server::stop);
155154
if (https1Server != null) close(https1Server::stop);
156155
if (https2Server != null) close(https2Server::stop);
@@ -160,7 +159,8 @@ private void close(AutoCloseable closeable) {
160159
try {
161160
closeable.close();
162161
} catch (Exception x) {
163-
// OK.
162+
// OK to ignore and just log
163+
System.err.println("ignoring failure during close() of " + closeable + " due to: " + x);
164164
}
165165
}
166166

0 commit comments

Comments
 (0)