-
CSR
-
Resolution: Approved
-
P3
-
None
-
behavioral
-
low
-
Applications that rely on the place holder name to obtain the new era singleton (JapaneseEra.valueOf("NewEra")) will not work after the change.
-
Java API
-
SE
Summary
Replace the placeholder name for the Japanese new era with the government declared name.
Problem
The era name, "NewEra", was introduced with JDK-8202336 as the placeholder. However, the placeholder name does not represent [new era name].
Solution
Replace each instance of "NewEra" and its localized names made in JDK-8202336 and its square character (JDK-8211739) with the government declared name. Namely,
java.time.chrono.JapaneseEra:
The name of the JapaneseEra singleton that has the value of '3' will change from "NewEra" to "[new era name]". Thus,
JapaneseEra.values()
method will return 5 eras: [MEIJI, TAISHO, SHOWA, HEISEI, singleton representing [new era name]], the 5th item being changed from the one for "NewEra"JapaneseEra.of(3)
,JapaneseEra.valueOf("[new era name]")
, andJapaneseChronology.eraOf(3)
will return the singleton era that represents "[new era name]"JapaneseEra.getDisplayName()
for the new era instance will return the localized display name of "[new era name]"JapaneseEra.valueOf("NewEra")
will throw an IllegalArgumentException
java.util.Calendar:
The name of the era in JapaneseImperialCalendar
that has the value of '5' will change from "NewEra" to [new era name]. Thus,
new Calendar.Builder()
.setCalendarType("japanese")
.setFields(Calendar.ERA, 5,
Calendar.YEAR, 1,
Calendar.MONTH, Calendar.MAY,
Calendar.DAY_OF_MONTH, 1)
.build()
.getDisplayName(Calendar.ERA, Calendar.LONG, Locale.US)
returns "[new era name]"
java.lang.Character:
The return value from Character.getName(0x32FF)
will change from "SQUARE ERA NAME NEWERA" to "SQUARE ERA NAME [new era name]".
Specification
This is behavioral change only and no spec change is expected. As to JapaneseEra
changes, the era names are not part of their specifications, so changing the placeholder name to [new era name] does not warrant the specification changes.
- csr of
-
JDK-8215785 Replace the placeholder Japanese era name
-
- Resolved
-