Skip to content

fix: inject Spring ObjectMapper in JsonDocumentCreator#101

Merged
epugh merged 1 commit into
apache:mainfrom
adityamparikh:fix/json-creator-objectmapper-injection
May 8, 2026
Merged

fix: inject Spring ObjectMapper in JsonDocumentCreator#101
epugh merged 1 commit into
apache:mainfrom
adityamparikh:fix/json-creator-objectmapper-injection

Conversation

@adityamparikh
Copy link
Copy Markdown
Contributor

Summary

  • Replace per-call new ObjectMapper() allocation in JsonDocumentCreator.create() with Spring-injected instance for better performance and configuration consistency

Test plan

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

🤖 Generated with Claude Code

Replace per-call `new ObjectMapper()` allocation in
JsonDocumentCreator.create() with a Spring-injected instance.
ObjectMapper is expensive to create and thread-safe, so reusing the
Spring-managed singleton improves performance and ensures consistent
Jackson configuration across the application.

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/json-creator-objectmapper-injection branch from d795656 to feb3e1a Compare May 2, 2026 17:04
@epugh epugh merged commit 48966a2 into apache:main May 8, 2026
1 check 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