[lworld] RFR: 8376045: [lworld] Treat @NullRestricted fields as ACC_STRICT_INIT on load [v5]

Frederic Parain fparain at openjdk.org
Tue Jan 27 14:16:38 UTC 2026


On Sun, 25 Jan 2026 04:56:56 GMT, Chen Liang <liach at openjdk.org> wrote:

>> This is the 2nd PR in the strict removal series. 1st PR is #1952, and 3rd PR is #1959.
>> 
>> Automatically inject strict for NR annotations, and remove tests that previously kept them separate. Also add behavior where NR is only accepted for preview class files.
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix conditionals

src/hotspot/share/classfile/classFileParser.cpp line 1480:

> 1478:           }
> 1479:           const bool is_strict = (flags & JVM_ACC_STRICT) != 0;
> 1480:           if (!is_strict && !HAS_PENDING_EXCEPTION) {

This test should not include exception checking.
There's a bug just above, the call to `Exceptions::fthrow()` should be followed by a `return;` statement.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1951#discussion_r2732212361


More information about the valhalla-dev mailing list