changeset 53550:8ea340a71f17

8217609: New era placeholder not recognized by java.text.SimpleDateFormat Reviewed-by: nishjain, rriggs
author naoto
date Tue, 29 Jan 2019 07:46:50 -0800
parents ad3438957ff5
children ab949b3e39bc
files make/jdk/src/classes/build/tools/cldrconverter/CalendarType.java src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/ja.xml src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/root.xml test/jdk/java/util/Calendar/JapaneseEraNameTest.java
diffstat 4 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/make/jdk/src/classes/build/tools/cldrconverter/CalendarType.java	Tue Jan 29 10:24:38 2019 -0500
+++ b/make/jdk/src/classes/build/tools/cldrconverter/CalendarType.java	Tue Jan 29 07:46:50 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, 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
@@ -40,7 +40,7 @@
         {0,   2},   // generic
         {0,   2},   // gregorian
         {0,   1},   // buddhist
-        {232, 4},   // japanese (eras from Meiji)
+        {232, 5},   // japanese (eras from Meiji)
         {0,   2},   // roc (Minguo)
         {0,   1},   // islamic (Hijrah)
         {0,   1},   // islamic-civil (same as islamic)
--- a/src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/ja.xml	Tue Jan 29 10:24:38 2019 -0500
+++ b/src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/ja.xml	Tue Jan 29 07:46:50 2019 -0800
@@ -3633,6 +3633,7 @@
 						<era type="233">大正</era>
 						<era type="234">昭和</era>
 						<era type="235">平成</era>
+						<era type="236">元号</era> <!-- NewEra -->
 					</eraAbbr>
 					<eraNarrow>
 						<era type="0">大化</era>
@@ -3871,6 +3872,7 @@
 						<era type="233">T</era>
 						<era type="234">S</era>
 						<era type="235">H</era>
+						<era type="236">N</era> <!-- NewEra -->
 					</eraNarrow>
 				</eras>
 				<dateFormats>
--- a/src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/root.xml	Tue Jan 29 10:24:38 2019 -0500
+++ b/src/jdk.localedata/share/classes/sun/util/cldr/resources/common/main/root.xml	Tue Jan 29 07:46:50 2019 -0800
@@ -2030,6 +2030,7 @@
 						<era type="233">Taishō</era>
 						<era type="234">Shōwa</era>
 						<era type="235">Heisei</era>
+						<era type="236">NewEra</era> <!-- NewEra -->
 					</eraAbbr>
 					<eraNarrow>
 						<era type="0">Taika (645–650)</era>
@@ -2268,6 +2269,7 @@
 						<era type="233">T</era>
 						<era type="234">S</era>
 						<era type="235">H</era>
+						<era type="236">N</era> <!-- NewEra -->
 					</eraNarrow>
 				</eras>
 				<dateFormats>
--- a/test/jdk/java/util/Calendar/JapaneseEraNameTest.java	Tue Jan 29 10:24:38 2019 -0500
+++ b/test/jdk/java/util/Calendar/JapaneseEraNameTest.java	Tue Jan 29 07:46:50 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8202088 8207152
+ * @bug 8202088 8207152 8217609
  * @summary Test the localized Japanese new era name (May 1st. 2019-)
  *      is retrieved no matter CLDR provider contains the name or not.
  * @modules jdk.localedata
@@ -53,8 +53,8 @@
             // type,    locale,  name
             { LONG,     JAPAN,   "\u5143\u53f7" }, // NewEra
             { LONG,     US,      "NewEra" },
-            { SHORT,    JAPAN,   "N" },
-            { SHORT,    US,      "N" },
+            { SHORT,    JAPAN,   "\u5143\u53f7" },
+            { SHORT,    US,      "NewEra" },
         };
     }