The static field VarHandle is missing null checks that blocks incoming nulls.
The fix is simple; the overwhelming changes come from these areas: 1. To introduce a null-restricted set of fields and values, we need to use early initialization and null-restricted array creation for our test templates. 2. Added `test(InstanceField|StaticField|Array)NullPointerException` to `VarHandleTest(MethodHandle|)AccessNullRestrictedValue` for the effective unit tests. Without the patch, the `testStaticFieldNullPointerException` fails. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8388448 Changes: https://git.openjdk.org/jdk/pull/32115/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32115&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8388448 Stats: 5410 lines in 39 files changed: 5262 ins; 9 del; 139 mod Patch: https://git.openjdk.org/jdk/pull/32115.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32115/head:pull/32115 PR: https://git.openjdk.org/jdk/pull/32115
