Repository navigation
Retain replacement builders in non-vanilla array deserialization - #6368
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
`deserializeSetAndReturn()` returned `null` for a JSON null id, which lost the builder now that array-shape builder deserialization retains the return value. Add Object Id tests, use `DatabindTestUtil`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Review ✅ Approved🟡 Medium risk · Retaining replacement builders and the current instance for null IDs changes deserialization state, potentially changing field values for immutable builders. Preserves replacement builders in VerificationRules No rules evaluated Functional validation Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Fixes #6363.
BeanAsArrayBuilderDeserializer._deserializeNonVanilladiscards the result ofdeserializeSetAndReturn, so immutable builder methods lose their updates. Preserve each returned builder, as the vanilla and property-based paths already do.Adds regression coverage for all properties visible in an active view, a filtered property, and view-annotated builders without an active view. On unchanged production code all three tests fail with zero-valued fields; after the one-line fix the fork's full build matrix passes on Java 17 (Ubuntu and Windows), 21 and 25.
Summary by Gitar
instanceinObjectIdValuePropertyinstead ofnull, so builders are not lostThis will update automatically on new commits.