> This PR proposes to improve the handling of the fields in > `LazyCollections.Mutexes` so that it becomes more evident that there are no > races. It is also proposed to add a defensive check of `mutexes` so that it > is obvious to a reader that the `Unsafe` operation does not operate on > `null`. Furthermore, it is proposed to remove the extra `AtomicInteger` > object and use an `int` field directly. > > Please note that there is no (known) error in how the class `Mutexes` works. > This PR only makes it more explicit and efficient. So, for example, we do not > have to backport this PR. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Fix comment ------------- Changes: - all: https://git.openjdk.org/jdk/pull/32070/files - new: https://git.openjdk.org/jdk/pull/32070/files/b9199fbc..b8e20ac3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=32070&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=32070&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/32070.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32070/head:pull/32070 PR: https://git.openjdk.org/jdk/pull/32070
