# HG changeset patch # User dfuchs # Date 1567615013 -3600 # Node ID 9ae63aa9fc22dcb7ce211f5a50152f916badd21b # Parent fbbe6672ae15deaf350a9e935290a36f57ba9c25 8171405: java/net/URLConnection/ResendPostBody.java failed with "Error while cleaning up threads after test" Summary: test cleaned up to improve safe termination Reviewed-by: michaelm, vtewari, dfuchs Contributed-by: Julia Boes diff -r fbbe6672ae15 -r 9ae63aa9fc22 test/jdk/java/net/URLConnection/ResendPostBody.java --- a/test/jdk/java/net/URLConnection/ResendPostBody.java Wed Sep 04 16:42:36 2019 +0100 +++ b/test/jdk/java/net/URLConnection/ResendPostBody.java Wed Sep 04 17:36:53 2019 +0100 @@ -51,100 +51,109 @@ static class Server extends Thread { - InputStream in; - OutputStream out; - Socket sock; - StringBuffer response; - ServerSocket server; + private InputStream in; + private OutputStream out; + private Socket sock; + private StringBuffer response; + private ServerSocket server; - Server (ServerSocket s) throws IOException - { + Server(ServerSocket s) throws IOException { server = s; } - void waitFor (String s) throws IOException - { - byte[] w = s.getBytes (); - for(int c=0; c