Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent null handling in ComponentDataGenerator #6825

Open
schwarzwald opened this issue Nov 15, 2024 · 1 comment
Open

Inconsistent null handling in ComponentDataGenerator #6825

schwarzwald opened this issue Nov 15, 2024 · 1 comment

Comments

@schwarzwald
Copy link

schwarzwald commented Nov 15, 2024

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

@netsrotr
Copy link

We encountered the same issue with Vaadin Version 24.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants