diff --git a/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java b/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java index f30eb9906b32d4c0388f3535cddb07b97d2d124b..d431fa4acb3cec02215799f9b7a0da397b4ca42a 100644 --- a/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java +++ b/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java @@ -126,9 +126,10 @@ public class TCKDateTimeFormatters { @Test public void test_pattern_String() { DateTimeFormatter test = DateTimeFormatter.ofPattern("d MMM yyyy"); + Locale fmtLocale = Locale.getDefault(Locale.Category.FORMAT); assertEquals(test.format(LocalDate.of(2012, 6, 30)), "30 " + - Month.JUNE.getDisplayName(TextStyle.SHORT, Locale.getDefault()) + " 2012"); - assertEquals(test.getLocale(), Locale.getDefault()); + Month.JUNE.getDisplayName(TextStyle.SHORT, fmtLocale) + " 2012"); + assertEquals(test.getLocale(), fmtLocale, "Locale.Category.FORMAT"); } @Test(expectedExceptions=IllegalArgumentException.class)