RFR: 8294155: Exception thrown before awaitAndCheck hangs PassFailJFrame
Alexey Ivanov
aivanov at openjdk.org
Tue Feb 11 16:22:56 UTC 2025
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.
-------------
Commit messages:
- 8294155: Exception thrown before awaitAndCheck hangs PassFailJFrame
Changes: https://git.openjdk.org/jdk/pull/23564/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23564&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8294155
Stats: 14 lines in 1 file changed: 12 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/23564.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23564/head:pull/23564
PR: https://git.openjdk.org/jdk/pull/23564
More information about the client-libs-dev
mailing list