-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Description
There is an inconsistency in the handling of null values in the ComponentDataGenerator which can cause unexpected NullPointerExceptions.
In the method createComponent a null is handled gracefully and an empty Text is used as content.
But if the grid is refreshed and the components are re-rendered, the refreshData method in AbstractComponentDataGenerator calls updateComponent which does not perform this null handling, and it inevitably encounters a null pointer.
Expected outcome
The null values returned by ComponentRenderers should be accepted in both cases - when creating the cell and when updating the cell content.
Steps to reproduce
1.) Create a grid with component renderer which returns null as value.
2.) Call DataProvider#refreshItem on any row
Environment
Vaadin version(s): 24.5.4
Browsers
No response