8214770: java/time/test/java/time/format/TestNonIsoFormatter.java failed in non-english locales

Reviewed-by: lancea, bpb
This commit is contained in:
Naoto Sato 2018-12-04 11:10:14 -08:00
parent 53b849e17e
commit 3d0ccc7ec9

View File

@ -191,7 +191,7 @@ public class TestNonIsoFormatter {
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));