RFR: 8303213: Avoid AtomicReference in TextComponentPrintable [v2]
Alexey Ivanov
aivanov at openjdk.org
Mon Feb 27 19:06:21 UTC 2023
On Sun, 26 Feb 2023 14:55:27 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
>> If CompareAndSwap is not used, then AtomicReference could be replaced with volatile. It simplified code a bit.
>
> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>
> 8303213: Avoid AtomicReference in TextComponentPrintable
>
> read volatile field only once
Looks good to me.
src/java.desktop/share/classes/sun/swing/text/TextComponentPrintable.java line 50:
> 48: import java.util.concurrent.FutureTask;
> 49:
> 50: import javax.swing.*;
Should this wildcard import be expanded to single-class imports?
-------------
Marked as reviewed by aivanov (Reviewer).
PR: https://git.openjdk.org/jdk/pull/12018
More information about the client-libs-dev
mailing list