BTW, after then ensures it looks like a good candidate for a system-assert for not-null for all of those fields, right?
Gruss Bernd -- http://bernd.eckenfels.net ________________________________ Von: core-libs-dev <core-libs-dev-r...@openjdk.org> im Auftrag von Andrey Turbanov <aturba...@openjdk.org> Gesendet: Thursday, September 1, 2022 8:24:58 AM An: core-libs-dev@openjdk.org <core-libs-dev@openjdk.org>; security-...@openjdk.org <security-...@openjdk.org> Betreff: RFR: 8293197: Avoid double racy reads from non-volatile fields in SharedSecrets After integration of [JDK-8259021](https://bugs.openjdk.org/browse/JDK-8259021) a few more fields were added to `SharedSecrets` class. It make sense to update their reading code to use the same idiom. ------------- Commit messages: - [PATCH] SharedSecrets should avoid double racy reads from non-volatile fields - [PATCH] SharedSecrets should avoid double racy reads from non-volatile fields Changes: https://git.openjdk.org/jdk/pull/10076/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10076&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293197 Stats: 16 lines in 1 file changed: 8 ins; 0 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/10076.diff Fetch: git fetch https://git.openjdk.org/jdk pull/10076/head:pull/10076 PR: https://git.openjdk.org/jdk/pull/10076