On Mon, 17 Apr 2023 08:14:13 GMT, Dmitry Cherepanov <[email protected]> 
wrote:

>> This PR suggests to move generalPrimitives array to a new static nested 
>> GeneralPrimitives class to eliminate the possible deadlock. The Blit class 
>> (and other classes that register as general primitives) calls to 
>> GeneralPrimitives.register from the static initializer block without 
>> acquiring lock on the GraphicsPrimitiveMgr class.
>> 
>> This PR also includes a jtreg regression test which reproduces this issue 
>> without the patch and passes with the patch. Running tests from 
>> test/jdk/sun/java2d didn't reveal any issues with this patch.
>
> Dmitry Cherepanov has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   fixed long lines

test/jdk/sun/java2d/loops/GraphicsPrimitiveMgrTest.java line 28:

> 26: import java.util.concurrent.CountDownLatch;
> 27: 
> 28: /**

Suggestion:

/*

It's not a javadoc, so to avoid lots of warnings from IDE because of invalid 
tags, it's better to use a single asterisk.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13459#discussion_r1174035954

Reply via email to