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

Maurizio Cimadamore mcimadamore at openjdk.org
Wed May 15 10:37:24 UTC 2024


On Wed, 15 May 2024 06:15:35 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> 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?
>
> That's my recollection too. The usage here isn' related to modules which makes me wonder if this function should be renamed (not by this PR of course) of if we should be using PropertyList_unique_add (with AddProperty, WriteableProperty, InternalProperty) instead. There will be further GNU style options coming that will likely need to map to an internal system property in the same way.

I don't fully agree that this option is not module related (which is why I gave it that name). The very definition of illegal native access is related to native access occurring from a module that is outside a specific set. So I think it's 50/50 as to whether this option is module-related or not. Of course I can fix the code if there's something clearly better.

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

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


More information about the client-libs-dev mailing list