RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]
Doug Lea
dl at openjdk.org
Thu Apr 24 11:26:46 UTC 2025
On Wed, 23 Apr 2025 12:38:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Yeah, I originally did that, but the following patch is the "smallest change".
>> Given that the "original code" obtained the Field instance each call, this is still likely a performance improvement.
>
> This code has always used getDeclaredField each time so if anyone had run into a performance issue then we should have heard by now. So I think keeping the changes simple and just moving to Unsafe is okay for now.
Fine. The main effect of this change is to nearly revert to the pre-VarHandle version of this code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24821#discussion_r2058157158
More information about the core-libs-dev
mailing list