On Mon, 18 Sep 2023 22:42:09 GMT, Justin Lu <j...@openjdk.org> wrote:

> Please review this PR which restricts sub-classing of the internal calendar 
> system in sun.util.calendar to only the existing implementations.
> 
> As the implementation is long-standing and complete with no intent for future 
> sub-classing, the CalendarSystem should be made sealed. Modifiers adjusted 
> accordingly (`JulianCalendar.Date` must now have package visibility).
> 
> 
> This system has the following structure,
> 
> `CalendarSystem` extended by `AbstractCalendar` extended by `BaseCalendar` 
> extended by 
> (`Gregorian, JulianCalendar, LocalGregorianCalendar`)
> 
> `CalendarDate` extended by `BaseCalendar.Date` extended by 
> (`Gregorian.Date, ImmutableGregorianDate, JulianCalendar.Date, 
> LocalGregorianCalendar.Date`)
> 
> Additionally, CalendarUtils was made `final`, as it is a utility class 
> composed of static util methods.

I added a question on https://bugs.openjdk.org/browse/JDK-8316435 as to the 
effect on future calendar systems.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15803#issuecomment-1726166576

Reply via email to