On Thu, 16 Oct 2025 12:10:51 GMT, Per Minborg <[email protected]> wrote:
>> 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. I've reverted the @Stable annotation on AM.keySet. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27605#discussion_r2440164233
