RFR: 8372696: Allow boot classes to explicitly opt-in for final field trusting

Alan Bateman alanb at openjdk.org
Fri Nov 28 11:08:56 UTC 2025


On Fri, 28 Nov 2025 09:00:46 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> I wonder if we could enable the new annotation `@TrustFinalFields` on package level as well so we could get rid of _all_ the special handing in `ciField.spp`. I am not sure this is the best way to do it but it would perhaps be possible to annotate the `package-info.java` file. For example in `java.lang.invoke.package-info.java`:

The VM don't read/parse the package-info class. It's really only used from APIs to read the annotations. In any case, teh long term goal needs to be to remove all special handling.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28540#issuecomment-3588887344


More information about the hotspot-dev mailing list