Value class for ZoneOffset?

Brian Goetz brian.goetz at oracle.com
Tue Sep 30 21:10:13 UTC 2025


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/20250930/89562d39/attachment-0001.htm>


More information about the valhalla-dev mailing list