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

Add a way to choose between class or package instantiation mode for JaxbContext #2005

Merged

Conversation

jeremybalan
Copy link
Contributor

I suggest to add a way to choose between class or package instantiation for JaxbContext (class mode is still used by default).

To allow this, the builder of JaxbContextFactory has a new optional method "withJAXBContextInstantiationMode" to provide an enum for the choice between class and package mode. No call to this method = usage of class mode (backward compatible).

Benefits of a package way can be :

@jeremybalan
Copy link
Contributor Author

Class mode (by default) instantiate a JAXBContext using JAXBContext.newInstance(clazz) as it is actually

And package mode, if chosen, instantiate using JAXBContext.newInstance(clazz.getPackage().getName(), clazz.getClassLoader())

@velo velo merged commit 7557597 into OpenFeign:master Apr 6, 2023
@jeremybalan jeremybalan deleted the feature/jaxbcontext-package-instantiation branch April 6, 2023 19:54
velo added a commit that referenced this pull request Oct 7, 2024
… using package mode (#2005)

Co-authored-by: jernat <[email protected]>
Co-authored-by: Marvin Froeder <[email protected]>
velo added a commit that referenced this pull request Oct 8, 2024
… using package mode (#2005)

Co-authored-by: jernat <[email protected]>
Co-authored-by: Marvin Froeder <[email protected]>
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.

2 participants