On Tue, 19 Mar 2024 22:28:54 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> 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!

It's a matter of style mostly, so I don't really mind it. The debug issue can 
be remedied by adding breakpoints inside Lambdas, which all IDEs support I 
think (Eclipse and IntelliJ for sure).

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1407#discussion_r1531207452

Reply via email to