[threeten-dev] what happened to JapaneseChronology?

patrick zhang patrick.zhang at oracle.com
Fri Mar 15 01:30:36 PDT 2013


Hi,

Any suggestion for this problem?

Regards
Patrick

On 2013-3-13 12:37, Patrick Zhang wrote:
> Hi Team,
>
> What happened to JapaneseChronology? It will not support the later 2 
> eras? It looks it is one new failure and I do not meet it on last week.
> =============
> System.out.println(JapaneseChronology.INSTANCE.date(JapaneseEra.MEIJI, 
> 1, 1, 1));
> System.out.println(JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 
> 1, 1, 1));
> System.out.println(JapaneseChronology.INSTANCE.date(JapaneseEra.SEIREKI, 
> 1, 1, 1));
> System.out.println(JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 
> 1, 1, 1));       //will throw exception
> System.out.println(JapaneseChronology.INSTANCE.date(JapaneseEra.TAISHO, 
> 1, 1, 1));       //will throw exception
> ==============
>
> Exception info:
> ==============
> Exception in thread "main" java.lang.IllegalArgumentException
>     at java.time.chrono.JapaneseDate.of(JapaneseDate.java:256)
>     at 
> java.time.chrono.JapaneseChronology.date(JapaneseChronology.java:166)
>     at Test.f1(Test.java:17)
>     at Test.main(Test.java:5)
> ==============
>
> Regards
> Patrick
>
>


More information about the threeten-dev mailing list