RFR: 8353835: Implement JEP 500: Prepare to Make Final Mean Final [v4]

Chen Liang liach at openjdk.org
Mon Nov 10 20:27:41 UTC 2025


On Tue, 30 Sep 2025 08:12:25 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> src/hotspot/share/runtime/arguments.cpp line 2281:
>> 
>>> 2279:       }
>>> 2280:     } else if (match_option(option, "--illegal-final-field-mutation=", &tail)) {
>>> 2281:       if (strcmp(tail, "allow") == 0 || strcmp(tail, "warn") == 0 || strcmp(tail, "debug") == 0 || strcmp(tail, "deny") == 0) {
>> 
>> Is the `jdk.module.illegal.final.field.mutation` property intended as a public API? If so, where is it documented?
>
> System properties are used to "communicate" the value of options from the VM to the library code. All internal/undocumented.  There is a test in mutateFinal/cli/CommandLineTests.java that checks that specifying the system property on the command line is not effective.

In my followup investigation for how InternalProperty/internal() flag really works, I noted it has been effectively broken since the recent updates - back in 2018, the referenced VM.saveAndRemoveProperties is gone, and now filtering is done by System.createProperties. We should probably address that in another RFE.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25115#discussion_r2511752805


More information about the core-libs-dev mailing list