RFR: 8334742: Change java.time month/day field types to 'byte' [v2]
Roger Riggs
rriggs at openjdk.org
Wed Apr 30 21:35:44 UTC 2025
On Wed, 30 Apr 2025 20:38:59 GMT, Gautham Krishnan <duke at openjdk.org> wrote:
>> 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
I hope you've found [The OpenJDK Developers' Guide](https://openjdk.org/guide/), its a good read to know what to expect and what is expected of contributors.
Feel free to ask on the mail alias about how things work. If you found the issue you would have seen it was already assigned and it would be appropriate to ask.
Please continue.
As with any modification, its important to identify the tests that validate the change. In this case, the tests are in the repo under `test/jdk/java/time`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24975#issuecomment-2843334222
More information about the core-libs-dev
mailing list