In the description of the "editingCellProperty", we have :
"Represents the current cell being edited, or null if there is no cell being edited."
It's true at the very beginning, but once you've edited one cell. It will never be null again. Instead you do in "TableCell":
// reset the editing cell on the TableView
table.edit(-1, null);
So technically speaking, it's not set to null.. So I don't know if it's important or not, but maybe specify a bit the doc because the test :
getEditingCell() == null
is not a good test if someone wants to know if the TableView is editing something right now.
And the test :
getEditingCell().getRow() == -1
is not good either because an NPE will be thrown the first time.
"Represents the current cell being edited, or null if there is no cell being edited."
It's true at the very beginning, but once you've edited one cell. It will never be null again. Instead you do in "TableCell":
// reset the editing cell on the TableView
table.edit(-1, null);
So technically speaking, it's not set to null.. So I don't know if it's important or not, but maybe specify a bit the doc because the test :
getEditingCell() == null
is not a good test if someone wants to know if the TableView is editing something right now.
And the test :
getEditingCell().getRow() == -1
is not good either because an NPE will be thrown the first time.
- relates to
-
JDK-8269871 CellEditEvent: must not throw NPE in accessors
- Resolved