RFR: 8331671: Implement JEP 472: Prepare to Restrict the Use of JNI [v3]

David Holmes dholmes at openjdk.org
Wed May 15 01:04:02 UTC 2024


On Mon, 13 May 2024 15:32:27 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Fix another typo
>>  - Fix typo
>>  - Add more comments
>
> src/hotspot/share/runtime/arguments.cpp line 2271:
> 
>> 2269:     } else if (match_option(option, "--illegal-native-access=", &tail)) {
>> 2270:       if (!create_module_property("jdk.module.illegal.native.access", tail, InternalProperty)) {
>> 2271:         return JNI_ENOMEM;
> 
> I think it would be helpful to get guidance on if this is the right way to add this system property, only because this one not a "module property". The configuration (WriteableProperty + InternalProperty) look right.

So my recollection/understanding is that we use this mechanism to convert module-related `--` flags passed to the VM into system properties that the Java code can then read, but we set them up such that you are not allowed to specify them directly via `-D`. Is the question here whether this new property should be in the `jdk.module` namespace?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19213#discussion_r1600819327


More information about the serviceability-dev mailing list