On Mon, 13 Oct 2025 16:48:07 GMT, ExE Boss <[email protected]> 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

Reply via email to