<i18n dev> RFR: 8366178: Implement JEP 526: Lazy Constants (Second Preview) [v2]

Per Minborg pminborg at openjdk.org
Thu Oct 16 12:13:46 UTC 2025


On Mon, 13 Oct 2025 16:48:07 GMT, ExE Boss <duke at openjdk.org> wrote:

>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove redundant field
>
> src/java.base/share/classes/java/util/AbstractMap.java line 335:
> 
>> 333:      */
>> 334:     @Stable
>> 335:     transient Set<K>        keySet;
> 
> Are all uses of this field in `java.util` able to handle the `@Stable`ness of this field correctly?

That is a good question. The potentially different keySet values should be freely substitutable or else there seams to be something wrong. If they are FS, then the VM should be able to pick any. But it is a big assumption to say that *all* maps that extend AM behave in such a way.  We could go back to the previous version and shadow the field. That seems safest.

Note: there is work in progress to remove these fields.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27605#discussion_r2435668562


More information about the i18n-dev mailing list