oscerd opened a new pull request, #25823:
URL: https://github.com/apache/camel/pull/25823

   Fixes [CAMEL-24442](https://issues.apache.org/jira/browse/CAMEL-24442).
   
   ThriftDataFormat.unmarshal() deserialized into the defaultInstance field and 
returned
   that same object. The data format is shared by every exchange on the route, 
and
   Thrift's TBase.read() assigns only the fields present in the incoming bytes 
without
   clearing the object first, so:
   
   - a message that omitted an optional field kept the value left there by the 
previous
     message - deterministic, no concurrency needed;
   - concurrent unmarshals interleaved field writes into the one object;
   - every in-flight body was literally the same reference.
   
   Deserialize into defaultInstance.deepCopy() and return that. 
ProtobufDataFormat
   already builds a new instance per unmarshal. As a side effect 
defaultInstance is left
   untouched and now works as the template its name promises: values preset on 
it are
   visible on every message, where before the first message overwrote them.
   
   Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
   Signed-off-by: Andrea Cosentino <[email protected]>
   \n## Verification\n\n4 files changed, including 1 test file(s). Module build 
with \`-am\` is green on current main, no generated-file drift. Verified 
against the pre-fix code when the change was written.
   
   _Claude Code on behalf of oscerd_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to