Minor thoughts (Re: [External] : Re: JEP draft: Prepare to Restrict The Use of JNI

Ron Pressler ron.pressler at oracle.com
Mon Sep 4 09:42:20 UTC 2023



> On 2 Sep 2023, at 18:01, Attila Kelemen <attila.kelemen85 at gmail.com> wrote:
> 
> 1. Using modules: +Maybe some integrity benefit, -I'm punished by this JEP.
> 2. Not using modules: -Lose module benefits, +I can easily opt-out from this JEP.

The compartmentalisation and fine-grained control over the capabilities of individual components *is* the source of the benefits modules offer to those who are interested in them. If you turn off the compartmentalisation, then modules can’t offer their full benefits. Authoring modules would be easier still if we turned off strong encapsulation altogether, but then they wouldn’t be able to do their job at all.

> 
> Again, that is not what most people are asking for. The request is an easier way to opt-out. The integrity by default option I'm fine with (in fact, I do prefer so).

And again, because we don’t know that it is, in fact, significantly easier, nor even that those who opt in to compartmentalisation are primarily interested in ways to easily switch it off, it makes more sense to consider options after we know more, not before. For that matter, we don’t even know that that’s what most people are asking for. 

Your suggestion is not rejected. In fact, all your suggestions are reasonable; so much so that most of them are even mentioned in the JEP. They’re simply premature for this JEP. We’d like to be more cautious, and will consider adding such features AFTER we learn more about their necessity. This JEP will help us do that.

— Ron


More information about the jdk-dev mailing list