[threeten-dev] hg: threeten/threeten/jdk: #273 PeriodUntil throws exception
Xueming Shen
xueming.shen at oracle.com
Sat Mar 2 11:31:06 PST 2013
I guess the code before the change was intentionally to hide the
Objects.requireNoNull()
inside/after the "instanceof" check, so non-null && instanceof == true
"endDate" (99.9%+
in real world scenario) would only take one "if" check. The
Objects.requreNoNull there
is only to give you an accurate error message.
-Sherman
On 3/2/13 7:42 AM, roger.riggs at oracle.com wrote:
> Changeset: f90fd81415b6
> Author: rriggs
> Date: 2013-03-02 10:42 -0500
> URL: http://hg.openjdk.java.net/threeten/threeten/jdk/rev/f90fd81415b6
>
> #273 PeriodUntil throws exception
> The periodUntil methods do not correctly compute the period
> for HijrahDate, ThaiBuddistDate, MinguoDate, and JapaneseDate.
> ChronoDateImpl is enhanced to support 12 month based calendars.
>
> Added simple tests to TestHijrahChronology, TestJapaneseChronology,
> TestMinguoChronology, and TestHijrahChronology
>
> ! src/share/classes/java/time/LocalDate.java
> ! src/share/classes/java/time/chrono/ChronoDateImpl.java
> ! src/share/classes/java/time/chrono/ChronoLocalDate.java
> ! test/java/time/tck/java/time/chrono/TestHijrahChronology.java
> ! test/java/time/tck/java/time/chrono/TestJapaneseChronology.java
> ! test/java/time/tck/java/time/chrono/TestMinguoChronology.java
> ! test/java/time/tck/java/time/chrono/TestThaiBuddhistChronology.java
>
More information about the threeten-dev
mailing list