[12] RFR: 8210633: Cannot parse JapaneseDate string with DateTimeFormatterBuilder Mapped-values

Naoto Sato naoto.sato at oracle.com
Mon Sep 24 20:39:32 UTC 2018

Hi Stephen,

Thank you for the review.

On 9/22/18 11:57 PM, Stephen Colebourne wrote:
> The change seems simple enough.
> Does the test prove the change though? I thought the issue was with
> months, not years?

The jira issue refers to both. Added the month-of-year map testing as well:


In fact, the submitter is trying to use this mapping for "Gannen" (first 
year of the era) support for the upcoming Japanese new era (May/2019), 
where formatting the first year would result in "元年". Currently, 
j.t.SimpleDateFormat can display this with 'y' pattern, as it is 
calendar specific [1], DateTimeFormatter's 'y' is for digits only.



> Stephen
> On Thu, 20 Sep 2018 at 22:32, Naoto Sato <naoto.sato at oracle.com> wrote:
>> Hello,
>> Please review the fix to the following issue:
>> https://bugs.openjdk.java.net/browse/JDK-8210633
>> The proposed changeset is located at:
>> http://cr.openjdk.java.net/~naoto/8210633/webrev.00/
>> As the submitter pointed out, the overload method that takes Chronology
>> needs to be overridden in the anonymous DateTimeTextProvider class.
>> Naoto

More information about the core-libs-dev mailing list