Repository navigation
Apply JAXB factory properties when creating unmarshallers - #3519
Merged
velo merged 1 commit intoAug 19, 2026
Merged
Conversation
`JAXBContextFactory.withProperty` was only applied to Marshallers. Unmarshallers now receive the same properties; marshaller-only keys are skipped so existing `withMarshaller*` plus decode setups keep working. Fixes OpenFeign#3056 Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com>
velo
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
JAXBContextFactory.withPropertywas applied when creating aMarshaller(JAXBEncoder) but not when creating anUnmarshaller(JAXBDecoder). Sharing one factory for encode and decode therefore dropped factory properties on unmarshal.How
createUnmarshallerin bothjaxbandjaxb-jakarta.PropertyException) so existingwithMarshaller*helpers (for exampleJAXB_FORMATTED_OUTPUT) still work when the same factory is used to decode.Builder.withProperty.Testing
feign-jaxb: Tests run: 32, Failures: 0, Errors: 0, Skipped: 0feign-jaxb-jakarta: Tests run: 32, Failures: 0, Errors: 0, Skipped: 0Regression coverage:
buildsUnmarshallerWithProperty—withPropertyis visible on the created unmarshallerdecodesXmlUsingFactoryProperty— the property is used during unmarshal (IDResolver.startDocument)buildsUnmarshallerWhenFactoryHasMarshallerProperties— marshaller-only keys do not break unmarshaller creationFixes #3056
Made with Cursor