On Fri, 24 Feb 2023 19:28:49 GMT, Andy Goryachev <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java
>> line 1456:
>>
>>> 1454: private boolean isSbixGlyph(int glyphID) {
>>> 1455: if (sbixStrikes == null) {
>>> 1456: synchronized (this) {
>>
>> This looks like a double-checked locking pattern, which is not guaranteed to
>> be thread-safe.
>>
>> Suggestion: move the `synchronized` before the `if`.
>
> or check for null again after synchronized(this)
It doesn't matter, does it ? In that one in a million case we'd just build
the tables twice.
-------------
PR: https://git.openjdk.org/jfx/pull/1047