Re: RFR: 8327786: Add fluent setAccessible()

2024-03-14 Thread Sergey
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey wrote: > The feature allows to extract a private field value in a single expression, > like so: > > object.getClass().getDeclaredField().setAccessible().get(object) I'm sorry to hear this. It's done all the time in tests, by third-party libraries. I fi

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread David Holmes
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey wrote: > The feature allows to extract a private field value in a single expression, > like so: > > object.getClass().getDeclaredField().setAccessible().get(object) src/java.base/share/classes/java/lang/reflect/Field.java line 184: > 182: * @throw

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Joe Darcy
On Tue, 12 Mar 2024 00:16:52 GMT, Mandy Chung wrote: > 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. I concur. - PR Comment: https://git.o

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Mandy Chung
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey 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-832778

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Chen Liang
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey 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/

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Sergey
On Mon, 11 Mar 2024 23:22:44 GMT, Brian Burkhalter wrote: > > What is the "standard protocol" to find a reviewer? > > Reviewers will generally chime in of their own accord depending on their > expertise, interest, availability, the perceived importance of the issue, and > so on. What can I do

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Brian Burkhalter
On Mon, 11 Mar 2024 23:06:53 GMT, Sergey wrote: > What is the "standard protocol" to find a reviewer? Reviewers will generally chime in of their own accord depending on their expertise, interest, availability, the perceived importance of the issue, and so on. - PR Comment: https:

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Sergey
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey wrote: > The feature allows to extract a private field value in a single expression, > like so: > > object.getClass().getDeclaredField().setAccessible().get(object) So the only thing left seems to be finding a reviewer. What is the "standard protocol"

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Sergey
On Tue, 27 Feb 2024 06:09:03 GMT, Chen Liang wrote: > First, usually to propose a patch to core libraries, we usually submit an > issue or suggest an enhancement to https://bugs.java.com, or ask at > `core-libs-dev@openjdk.org`. > > A field that has been "set accessible" is supposed to be reus

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Lei Zaakjyu
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey wrote: > The feature allows to extract a private field value in a single expression, > like so: > > object.getClass().getDeclaredField().setAccessible().get(object) https://openjdk.org/contribute/ u may firstly have a look at this. - PR Co

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Chen Liang
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey wrote: > The feature allows to extract a private field value in a single expression, > like so: > > object.getClass().getDeclaredField().setAccessible().get(object) First, usually to propose a patch to core libraries, we usually submit an issue or sugg

Re: RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Sergey
On Thu, 25 Jan 2024 21:35:45 GMT, Sergey wrote: > The feature allows to extract a private field value in a single expression, > like so: > > object.getClass().getDeclaredField().setAccessible().get(object) How do I find an eligible reviewer and create an issue to link this PR to? Are there an

RFR: 8327786: Add fluent setAccessible()

2024-03-11 Thread Sergey
The feature allows to extract a private field value in a single expression, like so: object.getClass().getDeclaredField().setAccessible().get(object) - Commit messages: - Add functional-style setAccessible() Changes: https://git.openjdk.org/jdk/pull/17578/files Webrev: https://w