Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,13 @@ Object extractValueFromColumn(T item, Column<T> column) {
ValueProvider<T, String> customVP =
(ValueProvider<T, String>)
ComponentUtil.getData(column, GridExporter.COLUMN_VALUE_PROVIDER_DATA);
if (customVP != null) {
value = customVP.apply(item);
}
if (customVP != null) {
value = customVP.apply(item);
if (value == null && nullValueSupplier != null) {
value = nullValueSupplier.get();
}
return value;
}

Comment on lines +229 to 231
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The early return should be moved outside the if block to ensure it's always executed when a custom value provider exists, regardless of whether the value is null or not.

Suggested change
return value;
}
}
if (value != null) {
return value;
}

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The early return must stay inside the if (customVP != null) block to ensure no fallback logic is applied when a custom provider is present, even if its value is null.

// if there is a key, assume that the property can be retrieved from it
if (value == null && column.getKey() != null) {
Expand Down