Fixed test and fix is working fine. Fix testUI(DefaultCloseOperation::createUI) will create PassfailJFrame test windows when test starts.
PassFailJFrame.addTestWindow(testFrame); PassFailJFrame.addTestWindow(testDialog); Above code exists in the Test. So TestFrame and TestDailog windows will be created when testUI(DefaultCloseOperation::createUI) invoked. Need to remove above code as this code is not required. ------------- Commit messages: - 8338571: [TestBug] DefaultCloseOperation.java test not working as expected wrt instruction after JDK-8325851 fix Changes: https://git.openjdk.org/jdk/pull/21061/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21061&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8338571 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/21061.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21061/head:pull/21061 PR: https://git.openjdk.org/jdk/pull/21061
