RFR:JDK-8030864:Add an efficient getDateTimeMillis method to java.time

Stephen Colebourne scolebourne at joda.org
Wed Mar 2 12:11:54 UTC 2016


Remove "Subclass can override the default implementation for a more
efficient implementation." as it adds no value.

In the default implementation of

epochSecond(Era era, int yearofEra, int month, int dayOfMonth,
int hour, int minute, int second, ZoneOffset zoneOffset)

use

prolepticYear(era, yearOfEra)

and call the other new epochSecond method. See dateYearDay(Era era,
int yearOfEra, int dayOfYear) for the design to copy. If this is done,
then there is no need to override the method in IsoChronology.

In the test,

LocalDate.MIN.with(chronoLd)

could be

LocalDate.from(chronoLd)

Thanks
Stephen






On 2 March 2016 at 10:30, nadeesh tv <nadeesh.tv at oracle.com> wrote:
> Hi all,
>
> Please review an enhancement  for a  garbage free epochSecond method.
>
> Bug ID: https://bugs.openjdk.java.net/browse/JDK-8030864
>
> webrev: http://cr.openjdk.java.net/~ntv/8030864/webrev.01
>
> --
> Thanks and Regards,
> Nadeesh TV
>



More information about the core-libs-dev mailing list