[foreign-preview] RFR: Tweak warning text for restricted method access
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Wed Mar 2 14:55:51 UTC 2022
Following some internal feedback, the new warning for restricted method access has been tweaked to this:
WARNING: A restricted method in <class> has been called
WARNING: <method> has been called by <module>
WARNING: Use --enable-native-access=<module> to avoid a warning for this module
For instance:
WARNING: A restricted method in java.lang.foreign.CLinker has been called
WARNING: java.lang.foreign.CLinker::systemCLinker has been called by module panama_module
WARNING: Use --enable-native-access=panama_module to avoid a warning for this module
or, for unnamed modules:
WARNING: A restricted method in java.lang.foreign.CLinker has been called
WARNING: java.lang.foreign.CLinker::systemCLinker has been called by the unnamed module
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module
This new text helps better connecting the waring with the action that a developer might want to take to get rid of the warning.
-------------
Commit messages:
- Tweak warning text
Changes: https://git.openjdk.java.net/panama-foreign/pull/660/files
Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=660&range=00
Stats: 10 lines in 2 files changed: 1 ins; 0 del; 9 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/660.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/660/head:pull/660
PR: https://git.openjdk.java.net/panama-foreign/pull/660
More information about the panama-dev
mailing list