RFR: 8341982: Simplify JButton/bug4323121.java [v3]

Alexey Ivanov aivanov at openjdk.org
Fri Oct 18 12:16:20 UTC 2024


On Fri, 18 Oct 2024 12:02:49 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

>> Alexey Ivanov has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Amend indentation in the finally block
>>  - Inline mouseEntered listener for the button
>
> test/jdk/javax/swing/JButton/bug4323121.java line 59:
> 
>> 57: 
>> 58:     // Usage of this flag is thread-safe because of using the mouseEntered latch
>> 59:     private static boolean modelArmed;
> 
> should it be volatile?

No, it shouldn't: _“this flag is thread-safe because of using the `mouseEntered` latch”_.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21475#discussion_r1806394349


More information about the client-libs-dev mailing list