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

Marius Hanl mhanl at openjdk.org
Thu Sep 1 08:04:20 UTC 2022


On Mon, 22 Aug 2022 17:49:41 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> you are right! unless, of course, someone writes code to invoke these methods directly. For example, simpleSelect() is protected, so any Behavior that extends CellBehaviorBase might encounter an NPE.

No strong opinion here but I think in this case it doesn't really matter since all behaviours are anyway in `com.sun.javafx` and since `simpleSelect` is called by `doSelect`, there won't be any problem. 
But another null check does not hurt on the other hand.

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

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


More information about the openjfx-dev mailing list