Minor thoughts (Re: [External] : Re: JEP draft: Prepare to Restrict The Use of JNI
Alan Bateman
Alan.Bateman at oracle.com
Mon Sep 4 06:49:08 UTC 2023
On 01/09/2023 22:16, Attila Kelemen wrote:
> :
>
> When I wrote "stop using the module system" I'm obviously talking
> about the application itself being modular. I would have expected that
> you also believe that it would be better, if applications were
> modular. Given that I assumed from what you wrote that you regret the
> fact that modules were not added on day 1 (in which case there would
> only be modular apps most likely). Yet, this JEP just motivates people
> away from modules.
I don't think this is the case. Instead I think there is a lot of
potential for a much better story. Modules lend themselves to doing a
lot more at build time and setting things up for simple/fast checks at
startup (think post resolution checks). It's not hard to think about
fail fast if a module requires the "restricted methods or native code"
capability that has not been granted. Combing a set of modules at link
time also has a potentially interesting story when using jlink to create
an application that has an initial/main module. In that case, you can
think about checking capabilities (or whatever term is introduced) at
build/link time.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk-dev/attachments/20230904/192620b4/attachment.htm>
More information about the jdk-dev
mailing list