RFR: 8325566: [TestBug] Util.shutdown() to hide ALL Windows [v2]
Andy Goryachev
angorya at openjdk.org
Tue Mar 19 22:31:33 UTC 2024
On Tue, 19 Mar 2024 22:23:46 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
>> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> for each
>
> 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.
The only issue with this style is - it's hard to set breakpoints.
In this case it's not that important.
Thank you!
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1407#discussion_r1531200964
More information about the openjfx-dev
mailing list