-
Bug
-
Resolution: Fixed
-
P4
-
jfx16
failing test:
@Test
public void testEditStartEventAfterStartOnCell() {
setupForEditing();
int editingIndex = 1;
cell.updateIndex(editingIndex);
List<CellEditEvent<?, ?>> events = new ArrayList<>();
editingColumn.setOnEditStart(events::add);
cell.startEdit();
assertEquals(editingColumn, events.get(0).getTableColumn());
}
underlying reason is startEdit creating the event with an incorrect location:
CellEditEvent<S,?> editEvent = new CellEditEvent<>(
table,
table.getEditingCell(),
TableColumn.editStartEvent(),
null
);
issue is that table might not yet be in editing state (JDK-8187474),
fix is similar to that of the corresponding issue for ListCellJDK-8187432 - use cell state to create the tablePosition
Note: the NPE (vs. having an incorrect location) is caused byJDK-8269871 which accesses properties of the position without null guard
@Test
public void testEditStartEventAfterStartOnCell() {
setupForEditing();
int editingIndex = 1;
cell.updateIndex(editingIndex);
List<CellEditEvent<?, ?>> events = new ArrayList<>();
editingColumn.setOnEditStart(events::add);
cell.startEdit();
assertEquals(editingColumn, events.get(0).getTableColumn());
}
underlying reason is startEdit creating the event with an incorrect location:
CellEditEvent<S,?> editEvent = new CellEditEvent<>(
table,
table.getEditingCell(),
TableColumn.editStartEvent(),
null
);
issue is that table might not yet be in editing state (
fix is similar to that of the corresponding issue for ListCell
Note: the NPE (vs. having an incorrect location) is caused by
- relates to
-
JDK-8187432 ListView: EditEvent on start has incorrect index
- Resolved
-
JDK-8187474 Tree-/TableCell, TreeCell: editingCell/Item not updated in cell.startEdit
- Resolved
-
JDK-8269871 CellEditEvent: must not throw NPE in accessors
- Resolved