Skip to content

Handle null TableCell entries in table/data_table block rows - #461

Merged
VictorHLi404 merged 4 commits into
masterfrom
vili/table-cell-null-deserializer
Jul 16, 2026
Merged

Handle null TableCell entries in table/data_table block rows#461
VictorHLi404 merged 4 commits into
masterfrom
vili/table-cell-null-deserializer

Conversation

@VictorHLi404

Copy link
Copy Markdown
Contributor

Summary

  • Adds NullSafeTableCellRowDeserializer and NullSafeDataTableCellRowDeserializer — custom Jackson deserializers that substitute a blank RawTextTableCell for any null cell entries within a row
  • Annotates getRows() in both TableIF and DataTableIF with @JsonDeserialize(contentUsing = ...) to wire in the deserializers
  • Adds test fixtures and assertions for null-cell deserialization in both block types

NOTE: this PR is to address null problems observed in production. Slack is returning table/data_table blocks where individual cells within a row are null, causing deserialization to fail with: "Guava Collection of type ImmutableList does not accept null values". Using blank RawTextTableCell (empty string) rather than skipping nulls preserves row structure so DataTableIF's column-count validation continues to work correctly.

Test plan

  • TableBlockTest#itDeserializesNullCellsAsBlankRawTextCells — null cell in a table row becomes RawTextTableCell.of("")
  • DataTableBlockTest#itDeserializesNullCellsAsBlankRawTextCells — null cells in both header and body rows are substituted correctly
  • All existing table and data_table block tests continue to pass (271 tests green locally)

@VictorHLi404
VictorHLi404 merged commit eea29bb into master Jul 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants