Skip to content

Fix #380: Blackbird records skip stock creator for default absent components - #381

Open
phraktle wants to merge 1 commit into
FasterXML:3.3from
phraktle:blackbird-record-absent-components
Open

phraktle wants to merge 1 commit into
FasterXML:3.3from
phraktle:blackbird-record-absent-components

Conversation

@phraktle

@phraktle phraktle commented Nov 9, 2026

Copy link
Copy Markdown

Fixes #380.

A missing component no longer forces _recordBuild when stock would give it the local's initial value: not required, no null-handling override, and an ALWAYS_NULL deserializer (or a stock scalar, for primitives). FAIL_ON_MISSING_CREATOR_PROPERTIES still takes the stock path. Other components, such as Optional, JsonNode and @JsonSetter(nulls = ...), are unchanged.

Reproducer from #378, record with one absent String: 475 ns / 1536 B → 375 ns / 1128 B, same as all components present (379 ns / 1120 B).

BBCodecRecordAbsentTest compares with stock across component kinds and the relevant features.

…bsent components

Stock gives an absent component the local's initial value (null, or zero for
a primitive) when it is not required, has no null-handling override, and its
deserializer is ALWAYS_NULL or a stock scalar. Construct directly in that case
unless FAIL_ON_MISSING_CREATOR_PROPERTIES is enabled.
@cowtowncoder

Copy link
Copy Markdown
Member

3.3 is the right branch -- excellent.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.3 blackbird Issue related to Blackbird module cla-received PR already covered by CLA (optional label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blackbird 3.3.0: record codegen falls back to stock creator when a component is absent

2 participants