On Thu, 17 Apr 2025 16:35:59 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Details: >> Refactored code as requested in the Bug description. >> >> Tested and verified the test passes. > > test/jdk/javax/swing/JRadioButton/8033699/bug8033699.java line 301: > >> 299: private static boolean actRB1 = false; >> 300: private static boolean actRB2 = false; >> 301: private static boolean actRB3 = false; > > These three boolean variables need to be declared volatile, the value is > modified on the EDT but their value is read on the main thread. You can replace them with `CountDownLatch`es, but it looks like an overkill in this case, moreover `hitKey` automatically invokes `robot.waitForIdle`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24384#discussion_r2049326782