<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="ltr">Then make a flag to disable those superpowers, if they're not desired or wanted. Or, better yet: make them declarable in a module definition, so libraries using those superpowers can easily be found and searched through, and can still enjoy those superpowers if they need them.<br /></div>
<br /></div>
<div name="messageReplySection">
<div dir="ltr" class="gmail_attr">Am Mo., 28. Aug. 2023 um 22:29 Uhr schrieb Alex Buckley <<a href="mailto:alex.buckley@oracle.com">alex.buckley@oracle.com</a>>:<br /></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 8/28/2023 12:51 PM, Glavo wrote:<br />
> A deep dive into every library isn't necessary for everyone.<br />
> If lib1 trusts lib2 it depends on, then most users who trust lib1 don't<br />
> need to investigate lib2.<br />
> We shouldn't make the majority of people pay for a very small number of<br />
> needs.<br />
<br />
From this JEP about restricting the use of JNI, and from the JEP about<br />
restricting the dynamic attachment of agents, I think a lot of people<br />
have become aware of the "superpowers" which some libraries have<br />
silently enjoyed. Superpowers that allow private methods in the JDK to<br />
be redefined at any time. Superpowers that allow native code to be<br />
invoked and then call back into Java with zero access control.<br />
<br />
I think a lot of people were unpleasantly surprised to discover that the<br />
implementation of low-level libraries was a huge factor in preventing<br />
upgrades from JDK 8 to 17 -- and would like to see the balance shift<br />
away from library developers being able to silently get superpowers, and<br />
towards users having the final say over those superpowers.<br />
<br />
Alex<br /></blockquote>
</div>
</body>
</html>