[foreign-memaccess+abi] RFR: 8293367: Enable native access for modules not in the boot layer [v3]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Sep 26 10:38:42 UTC 2022
On Sun, 25 Sep 2022 09:26:05 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Athijegannathan Sundararajan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review comments
>
> src/java.base/share/classes/java/lang/ModuleLayer.java line 322:
>
>> 320: * does not mention the module name {@code M}, or {@code ALL-UNNAMED} in case
>> 321: * {@code M} is an unnamed module.
>> 322: */
>
> The implementation changes are okay but I think the javadoc, particularly the description for IllegalCallerException, will need a bit of word smithing as we can't use informal language like "does not mention the module name" or talk about command line options or operands that the RI provides. The method description links to the "Restricted methods" section in the package description and maybe lend on that rather than trying to repeat in the exception description. It may be that you can just say that the caller is in a module that does not have native access enabled. That will work for module layers because the caller may had its native access enabled via the API rather than the command line.
>
> The method will also needs a @throws IllegalArgumentException for when the module is not in the module layer.
I agree with the comment - e.g. not specifying command line options in the API javadoc. However this is the standard text we have on all restricted methods, so for now I think this change seems at least consistent with all the other restricted methods, and we'll need to do another pass to fix them all.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/729
More information about the panama-dev
mailing list