On Tue, 5 Mar 2024 13:58:50 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
>> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Apply suggestions from code review >> >> Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com> >> Co-authored-by: Maurizio Cimadamore >> <54672762+mcimadam...@users.noreply.github.com> > > src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java line 817: > >> 815: JLA.addEnableNativeAccessToAllUnnamed(); >> 816: } else if (!JLA.addEnableNativeAccess(layer, name) && >> shouldWarn) { >> 817: warnUnknownModule(ENABLE_NATIVE_ACCESS, name); > > Should we instead warn irrespective of whether or not it's user configured > native access module name or a module name configured in JDK's build > configuration? Or are the build misconfiguration in the > `NATIVE_ACCESS_MODULES` expected to be caught much earlier in some other > place? For normal "full" JDK build, all the modules with pre-set native access should be present, and the warning might make sense there. But, the user may jlink a smaller version of the platform, or use `--limit-modules`, and that may cause some of the modules are not present. So I don't think it is realistic to produce a warning here for the modules with pre-set native access. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18106#discussion_r1514633918