[
https://issues.apache.org/jira/browse/CAMEL-27302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27302 started by Claus Ibsen.
-------------------------------------------
> camel-jackson - SchemaHelper.isPojo counts a file body as a POJO
> ----------------------------------------------------------------
>
> Key: CAMEL-27302
> URL: https://issues.apache.org/jira/browse/CAMEL-27302
> Project: Camel
> Issue Type: Bug
> Components: camel-jackson
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> {{SchemaHelper.isPojo}} (camel-jackson and camel-jackson3) treats
> {{GenericFile}} and other {{WrappedFile}} classes as POJOs, as it did for
> {{StreamCache}} before apache/camel#30458. Since CAMEL-27267 the {{binary}}
> data type keeps a {{File}} or {{WrappedFile}} body, so a file from a file,
> FTP or Azure Files consumer can reach code that uses {{isPojo}}, such as the
> {{resolve-pojo-schema-action}} Kamelet: it then sets {{X-Content-Class}} to
> the file class, and the Avro or Protobuf data types try to serialize the file
> object instead of its content.
> Expected: {{isPojo}} returns false for {{WrappedFile}} (and {{java.io.File}}
> / {{java.nio.file.Path}}, which the {{java}} package check already covers),
> as it does for {{StreamCache}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)