Value class for ZoneOffset?
Roger Riggs
roger.riggs at oracle.com
Wed Oct 1 15:59:14 UTC 2025
Hi Stephen,
Yes, we didn't take the time to refactor ZoneOffset to be a value class
and yes, the cache was the bump in the road on that.
We'll take another look at it.
Regards, Roger
On 9/30/25 5:10 PM, Brian Goetz wrote:
> Dan can fill in the details on this specific case, but by way of
> background, for JEP 401 we're not trying to migrate _every_ candidate
> value class in the JDK -- just a good set of the most common ones. So
> any list we came up with is surely going to be just an approximation,
> not the last word.
>
> On 9/30/2025 5:04 PM, Stephen Colebourne wrote:
>> I notice from the updated JEPhttps://openjdk.org/jeps/401 that
>> ZoneOffset is not intended to become a value class. I assume this is
>> because of the id and rules cache variables?
>>
>> It seems to me that ZoneOffset is very much applicable to be a value,
>> as it's state is fundamentally an int. Performance tests would be
>> needed, but it might be possible to create the id and rules on the fly
>> rather than caching them.
>>
>> thanks
>> Stephen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20251001/99d79451/attachment.htm>
More information about the valhalla-dev
mailing list