davsclaus opened a new pull request, #30493: URL: https://github.com/apache/camel/pull/30493
## What [CAMEL-27302](https://issues.apache.org/jira/browse/CAMEL-27302): `SchemaHelper.isPojo` (camel-jackson and camel-jackson3) returns `false` for a `WrappedFile`, such as the `GenericFile` of the file and FTP consumers, as #30458 (stream cache body is no POJO) did for `StreamCache`. ## Why Since CAMEL-27267 the `binary` (`application-octet-stream`) data type keeps a `File`, `Path` or `WrappedFile` body. A file from a file, FTP or Azure Files consumer can then reach `SchemaHelper.resolveContentClass`, which the schema resolvers use (for example the `resolve-pojo-schema-action` Kamelet). `isPojo` took the file class for a POJO and set it as the content class (`X-Content-Class`), so the Avro and Protobuf data types tried to serialize the file object instead of its content. `java.io.File` and `java.nio.file.Path` were already no POJO through the `java` package check; the new test covers them too. ## Tests - New `SchemaHelperTest.fileIsNoPojo` and `fileBodyHasNoContentClass` in both modules; they fail without the fix (`expected: <false> but was: <true>`). - `camel-jackson`: 126 tests, `camel-jackson3`: 132 tests, all pass. _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
