On Mon, 4 Aug 2025 17:21:22 GMT, Per Minborg <pminb...@openjdk.org> wrote:
> 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. This pull request has now been integrated. Changeset: 9dffbc9c Author: Per Minborg <pminb...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/9dffbc9c4cfee7a1f023d548c12194bcf60e4ffd Stats: 33 lines in 1 file changed: 3 ins; 0 del; 30 mod 8364540: Apply @Stable to Shared Secrets Reviewed-by: rriggs ------------- PR: https://git.openjdk.org/jdk/pull/26627