[threeten-dev] [threeten-develop] Public Eras changes
Stephen Colebourne
scolebourne at joda.org
Fri Feb 22 09:14:21 PST 2013
On 22 February 2013 16:48, roger riggs <roger.riggs at oracle.com> wrote:
> One ugly spot is are the return type from Chronology.eras; List<Era>;
> the subclasses would prefer to use List<JapaneseEra> but it is not
> compatible.
> Changing the signature to return List<? extends Era> is a possibility
> but propagates the ugliness to application code.
>
> Converting the return type to Era[] works also. Its not clear the use of
> List
> adds much value to these short and static values.
I'm opposed to further use of arrays on public APIs unless absolutely
necessary. That Java made generics harder than necessary is just a
general Java problem. So it should be List<? extends Era> with
suitable overrides in each chronology.
Stephen
More information about the threeten-dev
mailing list