RFR: 8194924: Checking for selection size before update
    Jeanette Winzenburg 
    fastegal at openjdk.java.net
       
    Sun Jun 27 12:36:10 UTC 2021
    
    
  
On Thu, 24 Jun 2021 11:29:23 GMT, Alexander Shaklein <github.com+26318329+cheesterx3 at openjdk.org> 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
    
    
More information about the openjfx-dev
mailing list