On Fri, 28 Feb 2025 17:53:52 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Test fails in ubuntu OCI system..Made it more robust my adding >> waitForIdle/delay before commencing test.. >> OCI system is ok with the fix. > > test/jdk/javax/swing/JMenu/4213634/bug4213634.java line 88: > >> 86: SwingUtilities.invokeAndWait(() -> { >> 87: frame.dispose(); >> 88: if (!menu.isSelected()) { > > Previously, the condition `!menu.isSelected()` was verified before the frame > was disposed of. > > I think you should verify whether menu is select before disposing of the > frame; once the frame is disposed of, the state of components is not > well-defined. I agree, frame.dispose() can be added within finally block instead of here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23837#discussion_r1975889962