RFR: 8023326 [TESTBUG] java/net/CookieHandler/LocalHostCookie.java misplaced try/finally
Mark Sheppard
mark.sheppard at oracle.com
Wed Aug 21 06:37:21 PDT 2013
Hi
please oblige and review the fix below to address the issue in JDK-8023326
which makes the test more robust to certain exceptions thrown.
http://cr.openjdk.java.net/~msheppar/8023326/webrev/
regards
Mark
--- old/test/java/net/CookieHandler/LocalHostCookie.java Wed Aug 21 12:23:21 2013
+++ new/test/java/net/CookieHandler/LocalHostCookie.java Wed Aug 21 12:23:21 2013
@@ -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);
+ }
}
}
More information about the net-dev
mailing list