Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that AtlasMap user classes may need to be registered for ref… #2328

Merged
merged 1 commit into from Mar 16, 2021

Conversation

zbendhiba
Copy link
Contributor

…lection fixes #2319

[ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
[ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
[ ] Phrases like Fix # or Fixes # will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
[ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
[ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html

Copy link
Contributor

@jamesnetherton jamesnetherton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion, we don't have to do this. But to get confidence that everything is working properly in native mode, maybe we should not return Person from the JAX-RS methods.

E.g this:

return producerTemplate.requestBody("atlasmap:mapping/json/atlasmapping-xml-to-java.json", xml, Person.class);

And this:

return producerTemplate.requestBody("atlasmap:mapping/json/atlasmapping-csv-to-java.json", csv, Person.class);

Otherwise Quarkus RestEasy is effectively still doing the reflective class registration.

@zbendhiba
Copy link
Contributor Author

@jamesnetherton
I changed the sentence in the doc to : "you may need to register".
I've add another class to test the need to register for reflection + examples. If we delete the @RegisterForReflection, the tests fail in native mode.

@jamesnetherton jamesnetherton merged commit 6571331 into apache:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document that AtlasMap user classes may need to be registered for reflection
3 participants