Ayush0612005 commented on PR #30917:
URL: https://github.com/apache/camel/pull/30917#issuecomment-7211380648

   Thanks @davsclaus, both points were right; I reproduced them on the previous 
commit. Fixed in 7ea5807fc:
   
   1. The body is read as text once (`getListBodyAsText`), and `aggregate` 
converts that same text both for the pipeline and for the single-stage 
fallback. A `StreamCache` holding a single `{"$match": ...}` stage failed 
before at the end of the already-read stream (`readStartDocument ... 
END_OF_DOCUMENT`). `testAggregateStreamCacheBodyWithASingleStage` covers it.
   2. A payload body other than a `String` is now detected with 
`BodyFacts.kindOf(body) == BodyTypeRegistry.Kind.PAYLOAD`, so a 
`File`/`GenericFile` body is read as text too. 
`testUpdateFileBodyWithCriteriaAndUpdate` covers a `File` body, which failed 
with `InvalidPayloadException` before.
   
   For the nit, the `InputStream` test now goes through a route with 
`noStreamCaching()`, so the plain `InputStream` case is covered. The 
camel-mongodb unit tests pass (1130), and I updated the PR description.
   
   _Claude Code on behalf of Ayush0612005_


-- 
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