<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">After a few hours of arguing and thinking, I suddenly noticed a horrible thing:<br></div><div dir="ltr">The --enable-native-access option is weakening the warning effect of options that break integrity.</div><div dir="ltr"><br></div><div dir="ltr">Integrity-breaking options such as --add-opens warn users that they are working in an unusual way.<br></div><div dir="ltr">This is a strong warning that users should use a safe alternative and should try not to use this option.<br></div><div dir="ltr"><br></div><div dir="ltr">But --enable-native-access is different.</div><div dir="ltr">In practice, FFI is very commonly used and cannot be abandoned for a foreseeable long time.<br></div><div dir="ltr">--enable-native-access will be the only way to enable FFI, which means that a lot of normal applications</div><div dir="ltr">will have to use integrity-breaking options for a long time.<br></div><div dir="ltr">This is a red flag, which means that users will be less vigilant about breaking integrity.<br></div><div dir="ltr"><br></div><div dir="ltr">Is it a good thing to see more and more behaviors as breaking integrity and requiring users to add corresponding options?<br></div><div dir="ltr">I don't know. But there's no question that if normal applications can't avoid using integrity-breaking options, </div><div dir="ltr">users won't continue to think those options are dangerous.</div><div dir="ltr"><br></div><div dir="ltr">As you can see, I strongly disagree with the design of the --enable-native-access option.<br></div><div dir="ltr">I think if it is released in Java 22, it will irreparably damage the integrity of the Java platform.<br></div><div dir="ltr">I hope it can be revisited and not let it abuse people's vigilance about breaking integrity.<br></div><div dir="ltr"><br></div><div dir="ltr">Glavo</div><div dir="ltr"><br></div><div dir="ltr"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>