RFR: 8187145: (Tree)TableView with null selectionModel: throws NPE on sorting [v5]
Andy Goryachev
angorya at openjdk.org
Fri Nov 4 16:04:43 UTC 2022
On Fri, 4 Nov 2022 14:15:43 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>> Any comments on this?
>
> hmm .. maybe this is a mis-understanding:
>
> - the case selected_items looks fishy (also in the original) - seems to not return if the selection is empty or now if the selection is null
> - every known case should return under any condition, IMO, delegating to super is done only for unhandled cases
>
> Also, selected_items looks weird to return from inside the loop across the selected cells on the very first iteration. Might be a bug.
>
> BTW: did I ever mention that we need tests for everything we change ;) See the equivalent fix for ListView for how to ..
I am clearly in the wrong, sorry. There is only one possible fall through for SELECTED_ITEMS -> CELL_AT_ROW_COLUMN which is not correct.
Q is, what should it return - a null or an empty list? (I am in favor of a null because selection is impossible, as opposed to "nothing is selected".
Whether the attribute can be null should be specified in javafx.scene.AccessibleAttribute, do you think?
-------------
PR: https://git.openjdk.org/jfx/pull/876
More information about the openjfx-dev
mailing list