RFR: 8371953: Document null handling in core reflection APIs [v2]
Alan Bateman
alanb at openjdk.org
Sun Nov 16 19:37:00 UTC 2025
On Sun, 16 Nov 2025 18:55:55 GMT, Chen Liang <liach at openjdk.org> wrote:
> So both `false` and `true` paths would have the same NPE behavior.
Ah, okay, you're right, the false and true cases can both fail with side effects. Maybe for another issue but this method just document that it may fail (with InaccessibleObjectException, SecurityException or NullPointerException) after modifying some of the elements.
As a more general point, I don't think this method is useful since the removal of the security manager. That is, it's motivation was to do a bulk suppressed with just one permission check.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28336#discussion_r2532181440
More information about the core-libs-dev
mailing list