On Thu, 25 Jan 2024 21:35:45 GMT, Sergey <d...@openjdk.org> wrote:

> The feature allows to extract a private field value in a single expression, 
> like so:
> 
> object.getClass().getDeclaredField().setAccessible().get(object)

For your information, [the proposal has been 
rejected](https://bugs.openjdk.org/browse/JDK-8327786?focusedId=14656208&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14656208):

> Suppressing access control checks with setAccessible(true) is not something 
> for most developers and not something to be encouraged. Using method 
> invocation chaining with setAccessible doesn't seem worth doing

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17578#issuecomment-1989650328

Reply via email to