On Fri, 12 Mar 2021 07:19:06 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
> Ok, I removed the "DCL" from that code and used the objects directly. AFAICS, > synchronization is redundant on those local objects. What would be a good > test for this change? I guess that synchronization became redundant because the field was moved to the local var. But before that, it guarded the method in question for multithreaded access and that was not part of the DCL. So it will be better to return those fields back. As the test I have run all automated tests and some manual tests, none of them triggered this code. ------------- PR: https://git.openjdk.java.net/jdk/pull/2948