Please Review: refactor of Chronology class

Stephen Colebourne scolebourne at joda.org
Mon Oct 14 15:37:32 UTC 2013


Fine by me (not an official reviewer)
Stephen

On 14 October 2013 15:34, roger riggs <roger.riggs at oracle.com> wrote:
> Hi,
>
> The java.time.chrono.Chronology should be split into an interface for
> Chronology
> and an AbstractChronology class that is the base for implementing a
> Chronology.
>
> A number of static methods on the java.time.chrono.Chronology class are
> inherited by subclasses but can be incorrectly understood to be instance
> methods.
> The methods 'from(Temporal)', of(String)', 'ofLocale(Locale)', and
> 'getAvailableChronologies()' all have the same static inheritance problem.
> They are intended as methods returning a Chronology but in the context
> of a specific Chronology, for example JapaneseChronology, can be confused
> with methods that return a JapaneseDate.
>
> Please Review:
>
> webrev:
> http://cr.openjdk.java.net/~rriggs/webrev-chrono-interface-8025719/
>
> javadoc:
> http://cr.openjdk.java.net/~rriggs/javadoc-chrono-interface-8025719/
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8025719



More information about the core-libs-dev mailing list