RFR: 8196065: ListChangeListener getRemoved() returns items that were not removed. [v3]

Ambarish Rapte arapte at openjdk.java.net
Fri Apr 30 05:40:56 UTC 2021


On Mon, 26 Apr 2021 18:58:02 GMT, mstr2 <github.com+43553916+mstr2 at openjdk.org> wrote:

>> The documentation for `ObservableListBase.nextRemove` states that a single change always refers to the current state of the list, which likely means that multiple disjoint removed ranges need to be applied in order, otherwise the next change's `getFrom` doesn't refer to the correct index.
>> 
>> `SelectedItemsReadOnlyObservableList` doesn't apply removals to `itemsRefList`, which means that subsequent removals will refer to the wrong index when retrieving the removed elements. This PR fixes the calculation of the current index.
>
> mstr2 has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Cleanup
>  - Added tests

Provided a couple scenario in previous comment which need to be addressed.

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

Changes requested by arapte (Reviewer).

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


More information about the openjfx-dev mailing list