Skip to content

fix: add Jackson annotations and defensive copying to SearchResponse#99

Open
adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:fix/search-response-annotations
Open

fix: add Jackson annotations and defensive copying to SearchResponse#99
adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:fix/search-response-annotations

Conversation

@adityamparikh
Copy link
Copy Markdown
Contributor

Summary

  • Add @JsonInclude(NON_NULL) and @JsonIgnoreProperties(ignoreUnknown = true) to SearchResponse for consistency with collection DTOs in Dtos.java
  • Add compact constructor with defensive copying using List.copyOf() and Map.copyOf() for mutable documents and facets fields, defaulting to empty collections when null

Test plan

  • ./gradlew build passes
  • ./gradlew nativeTest -Pnative passes (119/119 tests)
  • No regressions

🤖 Generated with Claude Code

Add @JsonInclude(NON_NULL) and @JsonIgnoreProperties(ignoreUnknown = true)
annotations for consistency with collection DTOs in Dtos.java. Add compact
constructor with defensive copying using List.copyOf() and Map.copyOf() for
the mutable documents and facets fields, defaulting to empty collections
when null.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
@adityamparikh adityamparikh force-pushed the fix/search-response-annotations branch from 2262c39 to 54fbfad Compare May 2, 2026 17:04
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.

1 participant