RFR: 8267392: ENTER key press on editable TableView throws NPE [v2]

Marius Hanl github.com+66004280+maran23 at openjdk.java.net
Wed May 19 14:15:00 UTC 2021


> ~~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.

Marius Hanl has updated the pull request incrementally with one additional commit since the last revision:

  Addressed review comment (changed from NP to NPE)

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

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/505/files
  - new: https://git.openjdk.java.net/jfx/pull/505/files/1b0cf0ed..89e65ccd

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=505&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=505&range=00-01

  Stats: 18 lines in 2 files changed: 7 ins; 7 del; 4 mod
  Patch: https://git.openjdk.java.net/jfx/pull/505.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/505/head:pull/505

PR: https://git.openjdk.java.net/jfx/pull/505


More information about the openjfx-dev mailing list