On Tue, 22 Sep 2020 01:58:48 GMT, yosbits <github.com+7517141+yos...@openjdk.org> wrote:
>> digging a bit: the BitSet was introduced with >> https://bugs.openjdk.java.net/browse/JDK-8093144 to solve some problem >> with selectionModels - don't know whether those still hold (there had been >> extensive changes to selection since then). > > Thank you for searching for the origin of this strange code. However, as far > as I read the comments, my intuition seems > to be correct. I looked at the fix for [JDK-8093144](https://bugs.openjdk.java.net/browse/JDK-8093144), and the reason BitSet was introduced was to ensure that the elements are removed from this List in reverse order (prior to that fix, they were removed in forward order with the loop index being messed up). This patch preserves the correct behavior, and just looks to be a better fix for that earlier problem. I do recommend running the failing test case from [JDK-8093144](https://bugs.openjdk.java.net/browse/JDK-8093144) to verify no regressions, but it looks like a good and safe fix to me. @yososs I marked this discussion thread as unresolved mainly to make this comment, but also because you didn't fix the spacing suggested by @nlisker -- please do that. ------------- PR: https://git.openjdk.java.net/jfx/pull/305