On Mon, 9 May 2022 18:08:55 GMT, Phil Race <p...@openjdk.org> wrote: >> Manukumar V S has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comment fixed: Removed finally block and added the call to >> disposeFrame() before the exception is thrown > > test/jdk/javax/swing/JPopupMenu/JPopupMenuFocusStealTest.java line 104: > >> 102: SwingUtilities >> 103: >> .invokeAndWait(JPopupMenuFocusStealTest::disposeFrame); >> 104: } > > I know it'll work but similarly to another review > (https://github.com/openjdk/jdk/pull/8477/files) > it seems to me that you can recode as > SwingUtilities.invokeAndWait( > () -> isFocusOwner.set(comboBox.isFocusOwner())); > SwingUtilities > > .invokeAndWait(JPopupMenuFocusStealTest::disposeFrame); > if (isFocusOwner.get()) { > System.out.println("Test Passed for " + laf); > } else { > throw new RuntimeException("Test Failed for " + laf); > } > > and don't need the finally block
Changed it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8426