RFR: 8279640: ListView with null SelectionModel/FocusModel throws NPE

Andy Goryachev angorya at openjdk.org
Mon Aug 22 16:42:00 UTC 2022


On Mon, 22 Aug 2022 15:43:28 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> There is also an unguarded access in CellBehaviorBase.selectRows(int,int) : 312 and CellBehaviorBase.sompleSelect(MouseButton,int,boolean) : 274, which are being fixed by #876
>> 
>> I'd suggest to integrate #876 first, followed by this PR, in order to avoid merge conflicts.
>
>> There is also an unguarded access in CellBehaviorBase.selectRows(int,int) : 312 and CellBehaviorBase.sompleSelect(MouseButton,int,boolean) : 274, which are being fixed by #876
>> 
>> I'd suggest to integrate #876 first, followed by this PR, in order to avoid merge conflicts.
> 
> @andy-goryachev-oracle  hmm .. are those methods reached if selectionModel == null? On skimming across its code, it looks like all callers back out (that is not call it) without selectionModel. Might be wrong, though - hard to tell without documented preconditions, and without tests 😉

@kleopatra : 
simpleSelect and selectRows are being called from CellBehaviorBase.mousePressed and mouseReleased, so probably yes.
in any way, they are updated in #876 ; fixing them here would likely create a merge conflict.

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

PR: https://git.openjdk.org/jfx/pull/711


More information about the openjfx-dev mailing list