On Tue, 11 Feb 2025 16:17:13 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
> If a manual test throws an exception during construction of `PassFailJFrame`, > the test execution hangs. When the builder pattern is used, no UI appears on > the screens, but the Java process does not terminate automatically because > there are windows which prevent AWT from shutting down. > > **Fix:** > > Catch exceptions in `PassFailJFrame.Builder.build()` and dispose of all the > windows if an exception occurs. > > This ensures all the created windows are disposed of, which lets AWT shut > down cleanly. > > _Note:_ the above problem doesn't occur when the test is run with `jtreg` > because jtreg shuts down the JVM as soon as the main thread exits. This pull request has now been integrated. Changeset: 906358d3 Author: Alexey Ivanov <aiva...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/906358d3a14ce755fec771f0a6bb856b3a8f3297 Stats: 14 lines in 1 file changed: 12 ins; 0 del; 2 mod 8294155: Exception thrown before awaitAndCheck hangs PassFailJFrame Reviewed-by: serb, azvegint, kizune ------------- PR: https://git.openjdk.org/jdk/pull/23564