[foreign-memaccess+abi] RFR: 8310659: The jar tool should support allowing access to restricted methods from executable jars
Maurizio Cimadamore
mcimadamore at openjdk.org
Tue Jun 27 10:42:26 UTC 2023
On Mon, 26 Jun 2023 16:44:01 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> Add `Enable-Native-Access` jar attribute. `Enable-Native-Access: true` is equal to passing `--enable-native-access=ALL-UNNAMED` on the command line when running an executable jar (using `-jar <jar file>`).
>
> Question: right now I've implemented this to check if the attribute value is exactly `true`, otherwise it is ignored. Should we only allow `true` or `false`, and throw an error on other values?
>
> Reviewer note: I've factored some of a test code for analyzing output to `TestEnableNativeAccessBase` for the enable native access tests.
test/jdk/java/foreign/enablenativeaccess/TestEnableNativeAccessJarManifest.java line 92:
> 90: @Test
> 91: public void testSucceed() throws Exception {
> 92: run("panama_no_unnamed_module_native_access", UNNAMED, successWithWarning("ALL-UNNAMED"), new String[]{});
Maybe using a record to capture attribute name/value would avoid the need to split the string?
Also, other tests use a data provider, should we do that here too?
-------------
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/843#discussion_r1243528819
More information about the panama-dev
mailing list