RFR: 8327786: Add fluent setAccessible()
Mandy Chung
mchung at openjdk.org
Tue Mar 12 00:19:13 UTC 2024
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey <duke at openjdk.org> wrote:
> The feature allows to extract a private field value in a single expression, like so:
>
> object.getClass().getDeclaredField().setAccessible().get(object)
I agree with the evaluation of [JDK-8327786](https://bugs.openjdk.org/browse/JDK-8327786) that `setAccessible(true)` isn't for most developers and this proposal is not worth doing.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17578#issuecomment-1989681305
More information about the core-libs-dev
mailing list