This PR proposes to update the `SharedSecrets` class in `jdk.internal.access` to annotate all but one static field with the `@Stable` annotation.
The `@Stable` annotation was added to all static fields except for `javaAWTFontAccess`, which remains unannotated. This is because it can be set using several code paths. No tests were changed or added, as this is an internal annotation adjustment with no expected behavioral impact. This PR passes `tier1`, `tier2`, and `tier3` testing on multiple platforms. In a future follow-up issue, we could identify fields in the implementations of the access classes that, in turn, are stable themselves. When this PR is integrated, it might be possible to remove local copies of access in classes to reduce bytecode size with little or no performance impact. Currently, we do not check the invariant, a field is set only once. This is yet another improvement proposal we could do -- maybe using Stable Values. ------------- Commit messages: - Make all fields except one @Stable in SharedSecrets Changes: https://git.openjdk.org/jdk/pull/26627/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26627&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364540 Stats: 33 lines in 1 file changed: 3 ins; 0 del; 30 mod Patch: https://git.openjdk.org/jdk/pull/26627.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26627/head:pull/26627 PR: https://git.openjdk.org/jdk/pull/26627