8028734: test/java/util/Locale/InternationalBAT.java changes does not restore the default TimeZone
Reviewed-by: naoto
--- a/jdk/test/java/util/Locale/InternationalBAT.java Wed Nov 20 10:00:54 2013 -0800
+++ b/jdk/test/java/util/Locale/InternationalBAT.java Wed Nov 20 21:34:47 2013 +0000
@@ -39,11 +39,13 @@
public static void main(String[] args) {
boolean pass = true;
- if (!testRequiredLocales()) {
- pass = false;
- }
- if (!testRequiredEncodings()) {
- pass = false;
+
+ TimeZone tz = TimeZone.getDefault();
+ try {
+ pass &= testRequiredLocales();
+ pass &= testRequiredEncodings();
+ } finally {
+ TimeZone.setDefault(tz);
}
if (!pass) {