[foreign-memaccess+abi] RFR: 8310659: The jar tool should support allowing access to restricted methods from executable jars

Jorn Vernee jvernee at openjdk.org
Tue Jun 27 13:53:59 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.

I've addressed the review comments:
- Use data provider and records in test.
- Switch to `Boolean.parseBoolean` for parsing.

I've also removed the useless `String cls` parameter, since it's value was always the same. And reformatted the jtreg test tags per the advice of netbeans.

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

PR Comment: https://git.openjdk.org/panama-foreign/pull/843#issuecomment-1609547073


More information about the panama-dev mailing list