RFR: 8334742: Change java.time month/day field types to 'byte' [v2]
Gautham Krishnan
duke at openjdk.org
Wed Apr 30 20:38:59 UTC 2025
> In the following classes, month and day values are stored in fields of type 'int' or 'short'. The range of allowed values is small enough that the type can be 'byte' instead.
>
> java.time.YearMonth
> java.time.MonthDay
> java.time.LocalDate
> java.time.chono.HijrahDate
>
> Refactoring the type will give the JVM a little more layout flexibility, and will be especially useful when these classes become value classes.
Gautham Krishnan has updated the pull request incrementally with one additional commit since the last revision:
Updating copyright header
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24975/files
- new: https://git.openjdk.org/jdk/pull/24975/files/e198afb2..148c3834
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24975&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24975&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/24975.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24975/head:pull/24975
PR: https://git.openjdk.org/jdk/pull/24975
More information about the core-libs-dev
mailing list