allthingssecurity commented on PR #27587: URL: https://github.com/apache/camel/pull/27587#issuecomment-6077614283
@oscerd thanks for the review. Point by point: 1. Done in 4254db47f140: the upgrade guide now says explicitly that only a `byte[]` body is kept as bytes, and that a body of any other type (such as an `InputStream`) is still read as text in the exchange charset. Converting such a body to bytes when the content type is not text can be a follow-up. 2. No code change. Nesting scalars only for a declared JSON content type was @davsclaus' suggestion (https://github.com/apache/camel/pull/27587#discussion_r4227329284): with only the assumed `application/json`, a 19-digit id would become a number JavaScript readers cannot represent exactly, and the text `null` a null payload. Both cases are pinned by tests (`shouldNestOnlyJsonObjectsAndArraysWithoutADeclaredContentType`, `shouldNestJsonScalarsOfAJsonContentType`). Happy to change it if the maintainers prefer otherwise. 3. Kept as is, per @davsclaus' request to override only a defaulted type and keep a declared one. Added a one-line rationale in the code in 4254db47f140: the route states the format of the bytes, and they may be valid text in a charset other than the exchange charset (which comes from `CamelCharsetName`, not from the content type). 4. Done in 4254db47f140: the class Javadoc is now a short bulleted list, one item per case. camel-cloudevents: 27 tests, 0 failures. CI still needs a maintainer to approve the workflow runs. _Claude Code on behalf of allthingssecurity_ -- 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]
