[lworld] RFR: 8346035: [lworld] javadoc for value objects when enable preview [v2]

Roger Riggs rriggs at openjdk.org
Thu Dec 12 22:07:47 UTC 2024


On Thu, 12 Dec 2024 00:09:24 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Tidy up ValueBased.html
>
> src/java.base/share/classes/java/time/ZoneId.java line 167:
> 
>> 165:  * class; programmers should treat instances that are {@linkplain #equals(Object) equal}
>> 166:  * as interchangeable and should not use instances for synchronization, mutexes, or
>> 167:  * with {@linkplain java.lang.ref.Reference object references}.
> 
> Should we add the preview warning with rewords, like
> 
> When preview features are enabled, all implementations of {@code ZoneId} are {@linkplain Class#isValue value class}. ...

There's more to do before ZoneId can be a Valhalla value class.
Its subtype ZoneOffset has a non-final field that caches ZoneRules. So ZoneOffset can't be a value class.

-------------

PR Review Comment: https://git.openjdk.org/valhalla/pull/1316#discussion_r1882951945


More information about the valhalla-dev mailing list