Ghidra is a software reverse engineering (SRE) framework
Test fix
dragonmacherf2c1dc3e9834
diff --git a/Ghidra/Framework/Docking/src/main/java/docking/framework/SplashScreen.java b/Ghidra/Framework/Docking/src/main/java/docking/framework/SplashScreen.javaindex 9242513993..01fb151859 100644--- a/Ghidra/Framework/Docking/src/main/java/docking/framework/SplashScreen.java+++ b/Ghidra/Framework/Docking/src/main/java/docking/framework/SplashScreen.java@@ -296,6 +296,10 @@ public class SplashScreen extends JWindow {hideSplashWindowTimer.stop();closeSplashScreen();if (hiddenFrame != null) {+ WindowListener[] windowListeners = hiddenFrame.getWindowListeners();+ for (WindowListener l : windowListeners) {+ hiddenFrame.removeWindowListener(l);+ }hiddenFrame.setVisible(false);hiddenFrame.dispose();hiddenFrame = null;diff --git a/Ghidra/Framework/Docking/src/test.slow/java/docking/framework/SplashScreenTest.java b/Ghidra/Framework/Docking/src/test.slow/java/docking/framework/SplashScreenTest.javaindex 8883c9efb5..8a6e0d4e78 100644--- a/Ghidra/Framework/Docking/src/test.slow/java/docking/framework/SplashScreenTest.java+++ b/Ghidra/Framework/Docking/src/test.slow/java/docking/framework/SplashScreenTest.java@@ -46,6 +46,7 @@ public class SplashScreenTest extends AbstractDockingTest {for (Window window : getAllWindows()) {runSwing(window::dispose);}+ waitForSwing();}@Test@@ -96,11 +97,13 @@ public class SplashScreenTest extends AbstractDockingTest {assertSpashScreenVisible(true);// show a modal dialog with no parent (this will use the Splash Screen's parent)- showModalPasswordDialog(null);+ DockingDialog dialog = showModalPasswordDialog(null);// When the splash screen and the dialog share a parent, then the dialog should NOT// cause the splash screen to go awayassertSpashScreenVisible(true);++ close(dialog);}@Test@@ -114,6 +117,8 @@ public class SplashScreenTest extends AbstractDockingTest {showModalPasswordDialog(frame);ensureSplashScreenWillClose();++ close(frame);}//==================================================================================================@@ -144,12 +149,11 @@ public class SplashScreenTest extends AbstractDockingTest {}Frame finalParent = parentFrame;- executeOnSwingWithoutBlocking(- () -> {- DockingDialog dialog =- DockingDialog.createDialog(finalParent, passwordDialog, finalParent);- dialog.setVisible(true);- });+ executeOnSwingWithoutBlocking(() -> {+ DockingDialog dialog =+ DockingDialog.createDialog(finalParent, passwordDialog, finalParent);+ dialog.setVisible(true);+ });JDialog dialog = waitForJDialog(dialogTitle);assertNotNull(dialog);