> Please review this PR which restricts sub-classing of the internal calendar > system in sun.util.calendar to only the existing implementations. Drive by > cleanup included. > > 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.
Justin Lu has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits: - Re-import Locale after merge for Formatter - Merge master - Replace sprintf0d with Formatter - setCache should not be overridden to be unsupported in IGD - Cleanup immutableGreg - Clarify the class with comments, also overide setCache to throw an exception - Use Override annotation within calendar system - Clarify private constructor with comment - private constructor in CalendarUtils - Make utility class 'CalendarUtils' final - ... and 5 more: https://git.openjdk.org/jdk/compare/373e37bf...f8698724 ------------- Changes: https://git.openjdk.org/jdk/pull/15803/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15803&range=02 Stats: 222 lines in 12 files changed: 101 ins; 48 del; 73 mod Patch: https://git.openjdk.org/jdk/pull/15803.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15803/head:pull/15803 PR: https://git.openjdk.org/jdk/pull/15803