On Fri, 4 Feb 2022 10:45:23 GMT, Alexey Ivanov <[email protected]> wrote:
>> Manukumar V S has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Fixed review comments - Filtered out Windows LnFs,removed
>> JTextField,updated Summary
>
> test/jdk/javax/swing/JButton/4659800/EnterKeyActivatesButton.java line 96:
>
>> 94: .filter(laf -> laf.getName().startsWith("Windows"))
>> 95: .map(laf -> laf.getClassName())
>> 96: .collect(Collectors.toList());
>
> Just a note. You can align the chained calls with the first `.stream` one.
> Here, it nearly fits into 80-column limit and doesn't exceed 100-column
> limit. I don't know if there are any guidelines in this regard for
> java.desktop module. It's up to you.
>
> IDE recommends replacing `.collect(Collectors.toList()` with `.toList()` —
> looks cleaner, doesn't it?
>
> It also recommends replacing lambda expression `laf -> laf.getClassName()`
> with method reference `UIManager.LookAndFeelInfo::getClassName`, yet the
> former seems to convey the intent clearer.
I don't find such a method .toList(), but toArray() is there, you mean that?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7296