Re: RFR: 8194924: Checking for selection size before update
On Thu, 24 Jun 2021 11:29:23 GMT, Alexander Shaklein wrote: > It is possible situation when `clearSelection()` is invoked during > `onChange()` notify. In such case `selectedCellsSeq` is clearing and possible > `IndexOutOfBoundsException` on `GenericAddRemoveChange` creation. > So we should check it to create correct `GenericAddRemoveChange`. As mentioned above, and also in the JBS issue, it is likely that we will close the bug as "not an issue", in which case this PR should be closed (withdrawn). - PR: https://git.openjdk.java.net/jfx/pull/542
RFR: 8194924: Checking for selection size before update
It is possible situation when `clearSelection()` is invoked during `onChange()` notify. In such case `selectedCellsSeq` is clearing and possible `IndexOutOfBoundsException` on `GenericAddRemoveChange` creation. So we should check it to create correct `GenericAddRemoveChange`. - Commit messages: - 8194924: Checking for selection size before update Changes: https://git.openjdk.java.net/jfx/pull/542/files Webrev: https://webrevs.openjdk.java.net/?repo=jfx=542=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8194924 Stats: 12 lines in 2 files changed: 11 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jfx/pull/542.diff Fetch: git fetch https://git.openjdk.java.net/jfx pull/542/head:pull/542 PR: https://git.openjdk.java.net/jfx/pull/542
Re: RFR: 8194924: Checking for selection size before update
On Thu, 24 Jun 2021 11:29:23 GMT, Alexander Shaklein wrote: > It is possible situation when `clearSelection()` is invoked during > `onChange()` notify. In such case `selectedCellsSeq` is clearing and possible > `IndexOutOfBoundsException` on `GenericAddRemoveChange` creation. > So we should check it to create correct `GenericAddRemoveChange`. looks like a usage error to me, for multiple reasons: in a listener to property changes of one property, we must not - access the state of another property (except we can guarantee the other to be completely orthogonal to the sender) - change the state of the sender - change the state of related properties The example DavisSelectionTest in the report seems to do all of these ;) - PR: https://git.openjdk.java.net/jfx/pull/542