[threeten-dev] Changing Chronology to an interface and AbstractChronology
roger riggs
roger.riggs at oracle.com
Tue Oct 8 12:26:21 PDT 2013
Hi Stephen,
The basic split of Chronology is fine.
I'll proceed with that unless there is some additional value of the
generics on AbstractChronology would be missed.
Roger
On 10/8/2013 1:19 PM, Stephen Colebourne wrote:
> Personally I think that the IDE is where most people discover the
> methods, and that would be unaffected.. That said, I see your point.
>
> I think given the timescale, I'd rather ensure the interface change
> goes in. If you are uncomfortable with it I suggest leaving the
> generic methods part out.
>
> BTW, we cannot fix this later. The effect is small though, as it just
> means that the few implementors of chronology will have a little more
> work to do to give their users the best API. Beyond that I see no
> harm.
>
> Stephen
>
>
>
> On 8 October 2013 17:29, roger riggs <roger.riggs at oracle.com> wrote:
>> Hi Stephen,
>>
>> By applying the proposed change to AbstractChronology, the JapaneseDate
>> Javadoc
>> becomes much less informative and complete, the only references to some
>> methods,
>> such as dateNow(), are in the tiny list of methods inherited from the
>> supertype.
>>
>> AbstractChronology duplicates the implementations of the default
>> methods of the interfaces (though they could just delegate).
>>
>> Javadoc:
>> http://cr.openjdk.java.net/~rriggs/javadoc-chrono-interface-8025719/
>>
>> webrev:
>> http://cr.openjdk.java.net/~rriggs/webrev-chrono-interface-8025719/
>>
>> The negative effects of adding generics to AbstractChronology seem to
>> outweigh
>> the benefits.
>>
>> Suggestions welcome,
>>
>> Roger
>>
>>
>>
>>
>>
>>
>> On 10/7/2013 6:42 PM, Stephen Colebourne wrote:
>>> The webrev looks good.
>>>
>>> I think that the extended behaviour would be a good extension. I
>>> didn't implement it back then as I wasn't certain that the change to
>>> interface was going to happen.
>>>
>>> Stephen
>>>
>>>
>>> On 7 October 2013 21:13, roger riggs <roger.riggs at oracle.com> wrote:
>>>> Changing Chronology to an interface is a positive step as suggested by
>>>> #341
>>>> and JBS https://jbs.oracle.com/bugs/browse/JDK-8025719.
>>>>
>>>> The suggsted fix includes the definition AbstractChronology<D extends
>>>> ChronoLocalDate>
>>>> and proposes cleanup of the subclasses based on the generic type.
>>>> This feature was not present in the proposed patch.
>>>> Has the suggestion been withdrawn?
>>>>
>>>> Thank, Roger
>>>> [1] webrev:
>>>> http://cr.openjdk.java.net/~rriggs/webrev-chrono-interface-8025719/
>>>>
More information about the threeten-dev
mailing list