On Wed, 12 Nov 2025 16:32:28 GMT, Jorn Vernee <[email protected]> wrote:
>> Per Minborg has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 112 commits: >> >> - Clarify toString spec >> - Merge branch 'master' into lazy-constants >> - Add @AOTSafeClassInitializer >> - Address comments in PR >> - Fix merge mistake >> - Merge master >> - Rework toString implementations >> - Update after doc comments >> - Merge branch 'master' into lazy-constants >> - Revert the AbstractMap.keySet @Stable annotation >> - ... and 102 more: https://git.openjdk.org/jdk/compare/76a1109d...1f439bec > > src/java.base/share/classes/java/util/LazyCollections.java line 607: > >> 605: assert Thread.holdsLock(mutex) : index + "didn't hold " + mutex; >> 606: // We know we hold the monitor here so plain semantic is enough >> 607: if (array[index] == null) { > > This should always be true when we get here, right? This is just an extra safety net to emulate a CAS op (while we are holding the monitor). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27605#discussion_r2527936851
