提交 f2bb1961 编写于 作者: M msheppar

8023326: [TESTBUG] java/net/CookieHandler/LocalHostCookie.java misplaced try/finally

Summary: amended test to be more robust to set of potential exceptions thrown
Reviewed-by: chegar, khazra
上级 8f4140d0
......@@ -72,9 +72,11 @@ public class LocalHostCookie {
}
}
} finally {
if (s != null) {
s.stopServer();
}
}
}
class Server {
HttpServer server;
......@@ -96,9 +98,11 @@ public class LocalHostCookie {
}
public void stopServer() {
if (server != null) {
server.stop(0);
}
}
}
class MyCookieHandler implements HttpHandler {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册