On Mon, 18 Mar 2024 22:53:03 GMT, Andy Goryachev <[email protected]> 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