提交 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,7 +72,9 @@ public class LocalHostCookie { ...@@ -72,7 +72,9 @@ public class LocalHostCookie {
} }
} }
} finally { } finally {
s.stopServer(); if (s != null) {
s.stopServer();
}
} }
} }
...@@ -96,7 +98,9 @@ public class LocalHostCookie { ...@@ -96,7 +98,9 @@ public class LocalHostCookie {
} }
public void stopServer() { public void stopServer() {
server.stop(0); if (server != null) {
server.stop(0);
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册