Integrated: 8267392: ENTER key press on editable TableView throws NPE
Marius Hanl
github.com+66004280+maran23 at openjdk.java.net
Fri May 21 12:02:35 UTC 2021
On Wed, 19 May 2021 00:48:18 GMT, Marius Hanl <github.com+66004280+Maran23 at openjdk.org> wrote:
> ~~Note: I reported the bug already, waiting for approval. Internal tracking id: 9070318. I will update the title as soon as the ticket is created.~~
> EDIT: Changed the title. :)
>
> This PR is fixing a NP, which is thrown when you press ENTER on an editbale table, after it is initially shown.
>
> When pressing ENTER, **TableViewBehaviorBase#activate** is retrieving the current focused row (**getFocusedCell()**) and from there the corresponding table column.
> This is null, when a table is initially shown. It can also be null, when the items from the underlying table are changed (e.g. **setItems()**) or when **getFocusModel().focus(row)** is used.
> Therefore, null is a valid value and we should guard against it.
This pull request has now been integrated.
Changeset: 58439103
Author: Marius Hanl <mariushanl at web.de>
Committer: Ajit Ghaisas <aghaisas at openjdk.org>
URL: https://git.openjdk.java.net/jfx/commit/5843910333ebdbc4ea14033461e980b0d0692ca8
Stats: 39 lines in 3 files changed: 33 ins; 0 del; 6 mod
8267392: ENTER key press on editable TableView throws NPE
Reviewed-by: fastegal, aghaisas
-------------
PR: https://git.openjdk.java.net/jfx/pull/505
More information about the openjfx-dev
mailing list