8214770: java/time/test/java/time/format/TestNonIsoFormatter.java failed in non-english locales.
authornaoto
Tue, 04 Dec 2018 11:10:14 -0800
changeset 52822 106ad76acf31
parent 52821 a7e587822a2d
child 52823 f5d0926026ec
8214770: java/time/test/java/time/format/TestNonIsoFormatter.java failed in non-english locales. Reviewed-by: lancea, bpb
test/jdk/java/time/test/java/time/format/TestNonIsoFormatter.java
--- a/test/jdk/java/time/test/java/time/format/TestNonIsoFormatter.java	Tue Dec 04 12:26:49 2018 -0500
+++ b/test/jdk/java/time/test/java/time/format/TestNonIsoFormatter.java	Tue Dec 04 11:10:14 2018 -0800
@@ -191,7 +191,7 @@
         String mdStr = "-01-01";
         DateTimeFormatter dtf = new DateTimeFormatterBuilder()
             .appendPattern("GGGG y-M-d")
-            .toFormatter()
+            .toFormatter(Locale.ROOT)
             .withChronology(chrono);
         DateTimeFormatter dtfLenient = dtf.withResolverStyle(ResolverStyle.LENIENT);
         assertEquals(LocalDate.parse(lenient+mdStr, dtfLenient), LocalDate.parse(strict+mdStr, dtf));