8158880: test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java fail with zh_CN locale
authorrpatil
Mon, 05 Aug 2019 11:11:18 +0530
changeset 57636 e7acf5388c29
parent 57635 18134c3c0780
child 57637 c38cca5ffb66
8158880: test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java fail with zh_CN locale Reviewed-by: naoto Contributed-by: thejasvi.v.voniadka@oracle.com
test/jdk/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java
--- a/test/jdk/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java	Mon Aug 05 07:59:42 2019 -0700
+++ b/test/jdk/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java	Mon Aug 05 11:11:18 2019 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -614,7 +614,7 @@
 
     @Test(dataProvider = "parseGenericTimeZonePatterns")
     public void test_appendZoneText_parseGenericTimeZonePatterns(String pattern, LocalDateTime ldt, ZoneId zId, String input) {
-        DateTimeFormatter df = new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter();
+        DateTimeFormatter df = new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(Locale.US);
         ZonedDateTime expected = ZonedDateTime.parse(input, df);
         ZonedDateTime actual = ZonedDateTime.of(ldt, zId);
         assertEquals(actual, expected);