[External] : Re: How to open a package from a module in the boot layer to a module in another layer?
Andrew Dinn
adinn at redhat.com
Tue Jan 14 13:06:36 UTC 2025
Hi Ron,
On 14/01/2025 12:30, Ron Pressler wrote:
> If you believe it's okay for the invariants of your core components possibly being compromised by plugins, that’s fine — and you can do what Alex suggested — but the JDK isn’t okay with that. If you insist on opening java.base to all code, that is an extreme, non-standard, and dangerous mode that *should* require extreme measures such as employing an agent — not a standard API.
I am afraid that last sentence doesn't make much sense to me.
I certainly think Java devs should and mostly do agree that opening
java.base to all code is a non-standard and risky mode in which to
operate the JVM (n.b. I switched out 'dangerous' and 'extreme' as I'm
not quite sure what they add to your pejorative assessment beyond
jeremiad-redolent rhetoric). However, you also seem to be saying that
employing an agent is an extreme measure. How so?
I have a corollary question: are you implying that using an agent to
expose java.base code selectively to targeted library, framework or,
even, application code is always inherently risky (dangerous or extreme,
even)? I ask because agents *are* provided with a API that explicitly
enables them to do this and you appear to be suggesting that this was/is
a mistake (n.b. that API was added because I demonstrated that, absent
such an API and given sufficient bytecode weaving ingenuity, an agent
can easily achieve the same outcome as if it were to use the API, only
probably with more risk of error).
regards,
Andrew Dinn
-----------
Red Hat Distinguished Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill
More information about the jigsaw-dev
mailing list