RFR: 8325566: [TestBug] Util.shutdown() to hide ALL Windows
Nir Lisker
nlisker at openjdk.org
Tue Mar 19 22:26:23 UTC 2024
On Mon, 18 Mar 2024 22:53:03 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
> Changing `Util.shutdown()` to hide **all** showing Windows and then call `Platform.exit()`.
> This simplifies the tests and ensures a clean shutdown.
tests/system/src/test/java/test/util/Util.java line 383:
> 381: runAndWait(() -> {
> 382: for (Window w : new ArrayList<>(Window.getWindows())) {
> 383: w.hide();
I think you can use `List.copyOf` instead of an `ArrayList` since it doesn't get modified (it's a one-time copy).
The iteration can also be
List.copyOf(Window.getWindows()).forEach(Window::hide);
if you want.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1407#discussion_r1531195323
More information about the openjfx-dev
mailing list