# HG changeset patch # User xiaofeya # Date 1529982226 25200 # Node ID 7284ce75471382922970c29a1473190824290118 # Parent bba1deda9216fce45567b363c29da983b0d45eb7 8196213: sun/security/tools/jarsigner/warnings/NoTimestampTest.java test fails on ar_SA locale. Reviewed-by: naoto Contributed-by: dan.z.zhou@oracle.com diff -r bba1deda9216 -r 7284ce754713 test/jdk/sun/security/tools/jarsigner/warnings/NoTimestampTest.java --- a/test/jdk/sun/security/tools/jarsigner/warnings/NoTimestampTest.java Tue Jun 26 10:43:50 2018 +0800 +++ b/test/jdk/sun/security/tools/jarsigner/warnings/NoTimestampTest.java Mon Jun 25 20:03:46 2018 -0700 @@ -22,12 +22,13 @@ */ import java.util.Date; +import java.util.Locale; import jdk.testlibrary.OutputAnalyzer; import jdk.test.lib.util.JarUtils; /** * @test - * @bug 8024302 8026037 + * @bug 8024302 8026037 8196213 * @summary Checks warnings if -tsa and -tsacert options are not specified * @library /lib/testlibrary /test/lib ../ * @build jdk.test.lib.util.JarUtils @@ -40,8 +41,16 @@ * and checks that proper warnings are shown. */ public static void main(String[] args) throws Throwable { - NoTimestampTest test = new NoTimestampTest(); - test.start(); + Locale reservedLocale = Locale.getDefault(); + Locale.setDefault(Locale.US); + + try { + NoTimestampTest test = new NoTimestampTest(); + test.start(); + } finally { + // Restore the reserved locale + Locale.setDefault(reservedLocale); + } } private void start() throws Throwable {