squakez opened a new pull request #5750:
URL: https://github.com/apache/camel/pull/5750
Before this PR a route as for example
`from("...").unmarshal().json(JsonLibrary.Jackson, User.class).to("...")` was
initializing a `JacksonDataFormat` trying to dynamically load a `Class` from
`unmarshalTypeName` parameter ([here the
code](https://github.com/apache/camel/blob/main/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/AbstractJacksonDataFormat.java#L512)).
This resulted in a missing class loading when we are using a route loaded
dynamically (as it happens in camel-k). This behavior happen when the class we
want to unmarshal is for instance provided with the same route source (ie, a
static inner class) because that class is not available in the classpath.
With this PR we'll be able to use the `Class` instead of leveraging a text
property avoiding a dynamic load later when initializing the dataformat.
Closes CAMEL-16755
<!-- Uncomment and fill this section if your PR is not trivial
- [ ] Make sure there is a [JIRA
issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change
(usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue,
without pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line
and body.
- [ ] If you're unsure, you can format the pull request title like
`[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX`
with the appropriate JIRA issue.
- [ ] Write a pull request description that is detailed enough to understand
what the pull request does, how, and why.
- [ ] Run `mvn clean install -Psourcecheck` in your module with source check
enabled to make sure basic checks pass and there are no checkstyle violations.
A more thorough check will be performed on your pull request automatically.
Below are the contribution guidelines:
https://github.com/apache/camel/blob/main/CONTRIBUTING.md
-->
--
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]