[threeten-dev] Review #383 ChronoLocalDate generics difficult to use
Stephen Colebourne
scolebourne at joda.org
Tue Jul 9 15:54:54 PDT 2013
ChronoLocalDateTimeImpl.plusWithOverflow looks like it should take D
as the argument, not ChronoLocalDate
A number of methods in ChronoZonedDateTimeImpl.ofInstant,
ChronoZonedDateTimeImpl.ensureValid and
ChronoLocalDateTimeImpl.ensureValid hide the <D> generic with a
method-level <D>. The method-level ones should use <R> (for result) to
be clearer.
ChronoLocalDateTimeImpl.of() looks like it would benefit from the
addition of a method-level <R>.
MinguoDate and HijrahDate have a change in readExternal, but Thai and
Japanese do not.
None of the above look like vital things to fix before pushing,
although they should all be investigated at some point.
Otherwise looks good.
thanks
Stephen
On 9 July 2013 22:39, roger riggs <roger.riggs at oracle.com> wrote:
> Please review this change remove the generic type parameter from
> ChronoLocalDate.
> As raised in issue #292 <https://github.com/ThreeTen/threeten/issues/292>
> the type parameter is unnecessary and unwieldy.
> Initially, it was useful to the implementation of default methods but the
> implementation
> has been refactored.
>
> This change reduces the number of cases where the developer will need
> to deal explicitly with wildcard type parameters to ChronoZonedDateTime
> and ChronoLocalDateTime.
>
> The patch contains the changes proposed in the GIST rebased to the current
> tip.
>
> Webrev:
> http://cr.openjdk.java.net/~rriggs/webrev-cld-nogenerictype-292/
>
> Please review and comment.
>
> Thanks, Roger
>
>
>
>
More information about the threeten-dev
mailing list