RFR: JVM detect null checked flag

Vicente Romero vromero at openjdk.org
Wed Feb 4 22:05:32 UTC 2026


On Wed, 4 Feb 2026 21:44:21 GMT, Chen Liang <liach at openjdk.org> wrote:

> `test/jdk/valhalla/valuetypes/Reflection.java` confirms that a value `!` field now generates the same VM field flag as `@NullRestricted`; this is verified by `ValueClass.isNullRestrictedField` which reads from the VM field flag.
> 
> We can now throw away the javac hack that injects `@NullRestricted`.

lgtm

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

Marked as reviewed by vromero (Committer).

PR Review: https://git.openjdk.org/valhalla/pull/2041#pullrequestreview-3753513516


More information about the valhalla-dev mailing list