On Tue, 24 Mar 2026 19:08:42 GMT, Andy Goryachev <[email protected]> wrote:

>> Philemon Hilscher has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   8303060: Improve set items and add change listener to tests
>>   
>>   Signed-off-by: Philemon Hilscher <[email protected]>
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/ChoiceBoxTest.java
>  line 646:
> 
>> 644:                 .addListener((ListChangeListener.Change<? extends 
>> MenuItem> _) -> changeCount.incrementAndGet());
>> 645: 
>> 646:         box.getItems().addAll(IntStream.range(0, 
>> 15).boxed().map(integer -> "Item " + integer).toList());
> 
> minor observation: maybe create a utility function for the code which is 
> replicated more than three times?
> 
> 
> box.getItems().addAll(createItemList(0, 15));

For any fluent apis I think this is unnecessary, because removing code 
duplications at all costs reduces readability.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2118#discussion_r2983904990

Reply via email to