Re: [OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer [v2]

2021-05-08 Thread Alexander Zvegintsev
On Fri, 12 Mar 2021 07:22:26 GMT, Aleksey Shipilev wrote: >> SonarCloud reports multiple incorrect double-checked locking cases in >> `sun.java2d.CRenderer`. For example: >> >> >> Arc2D arcToShape; >> >> ... >> if (arcToShape == null) { >> synchronized (this) {

Re: [OpenJDK 2D-Dev] RFR: JDK-8263467: Incorrect double-checked locking in sun.java2d.CRenderer

2021-05-08 Thread Sergey Bylokhov
On Mon, 15 Mar 2021 07:00:59 GMT, Sergey Bylokhov wrote: > 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 ret