CAMEL-24169: Schema resolver latches first resolved schema forever (4.18.x) - #24922
Merged
Conversation
…reaking multi-type routes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
gnodet
approved these changes
Jul 20, 2026
gnodet
left a comment
Contributor
There was a problem hiding this comment.
Clean backport of #24921 to 4.18.x. Same fix — removing the this.schema = answer latch from computeIfAbsent() — correctly scoped to the 2 resolvers that exist on this branch (jackson3 variants don't exist on 4.18.x).
Cherry-pick is straightforward — the affected code is identical between branches.
LGTM ✅
Claude Code on behalf of gnodet — AI-generated review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of #24921 to 4.18.x.
AvroSchemaResolverandProtobufSchemaResolverunconditionally promoting dynamically resolved schemas into thethis.schemainstance fieldschemesConcurrentMap becomes dead code — every subsequent exchange short-circuits to the latched schema regardless of body type or per-exchange propertiesthis.schema = answerlatch fromcomputeIfAbsent()sothis.schemais only authoritative when explicitly set viasetSchema()Test plan
mvn verifyincamel-jackson-avroandcamel-jackson-protobufClaude Code on behalf of davsclaus