RFR: 8197991: Selecting many items in a TableView is very slow [v5]

Abhinay Agarwal duke at openjdk.java.net
Fri Jan 7 07:39:20 UTC 2022


On Thu, 6 Jan 2022 21:01:11 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Abhinay Agarwal has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Remove commented out method. Document constructors.
>>  - Add tests
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/MultipleSelectionModelImplTest.java line 1436:
> 
>> 1434:         model.clearSelection();
>> 1435: 
>> 1436:         assertTrue(model.getSelectedIndices().isEmpty());
> 
> I recommend to also check the size.

Isn't checking the size redundant in this case? `model.getSelectedIndices().isEmpty()` indicates that `model.getSelectedIndices().size()` is `0`.

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

PR: https://git.openjdk.java.net/jfx/pull/673


More information about the openjfx-dev mailing list