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
--- a/jdk/test/java/net/CookieHandler/LocalHostCookie.java Mon Sep 09 13:59:51 2013 +0200
+++ b/jdk/test/java/net/CookieHandler/LocalHostCookie.java Fri Sep 06 15:00:59 2013 +0100
@@ -72,7 +72,9 @@
}
}
} finally {
- s.stopServer();
+ if (s != null) {
+ s.stopServer();
+ }
}
}
@@ -96,7 +98,9 @@
}
public void stopServer() {
- server.stop(0);
+ if (server != null) {
+ server.stop(0);
+ }
}
}