k-krawczyk opened a new pull request, #30773:
URL: https://github.com/apache/camel/pull/30773

   Follow-up to #30256 (CAMEL-26521) and #30258 (CAMEL-27035), from the review 
of #30766 (CAMEL-26553).
   
   A `ByteArrayOutputStream`, the body camel-tika parse produces, failed in 
both components as a value Camel reads only as its `toString()`: in the 
watsonx-ai operations that read the body as text, and in the 
`CamelAlibabaKmsPlaintext` header of alibaba-kms. `BodyFacts` counts it as 
data, not as a payload, and `IOConverter.toString(ByteArrayOutputStream, 
Exchange)` decodes the same bytes its `toString()` does, so the `toString()` 
rule cannot tell it from a Map or a POJO. Before CAMEL-26521 watsonx read it as 
text. Neither change is released yet.
   
   `ByteArrayOutputStream` now joins `UUID`, `URI`, `URL`, `java.time` values 
and `Date` in `isTextValue`, as #30766 does for the embeddings components.
   
   Tests: 
`WatsonxAiMessageBodyTest#chatReadsAByteArrayOutputStreamBodyAsTheUserMessage` 
and `KMSInputTest#aByteArrayOutputStreamPlaintextHeaderIsEncryptedAsItsText`, 
both failing on main. watsonx-ai (48) and alibaba-kms (25) unit tests pass with 
`-Psourcecheck`. No doc change: the watsonx page already lists a stream as text.
   
   _Reported by Claude Code on behalf of Karol Krawczyk_
   


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