Skip to content

Allow JAXBContextFactory unmarshaller to have properties applied #3056

@ramonnascimento-montreal

Description

Hello!
I'm using the JAX-B encoder and decoder. To do this, I initialize a JAXBContextFactory with properties using the "withProperty" method of its builder.
During the JAXBEncoder marshalling process, the properties defined in the JAXBContextFactory are correctly applied, and the marshalling process is successful.
However, during the JAXBDecoder unmarshalling process, I noticed that the same properties are not applied to the unmarshaller, causing a problem with the unmarshalling process.

I would like it to be possible to apply the properties to the unmarshaller as well. It would probably be more appropriate for the properties to be applied nominally to the marshaller and unmarshaller.

References:
The builder's method JAXBContextFactory.withProperty:

public Builder withProperty(String key, Object value) {

JAXBContextFactory creating a marshaller and using method setMarshallerProperties:

setMarshallerProperties(marshaller);

JAXBContextFactory creating a unmarshaller (that doesn't apply any property)

public Unmarshaller createUnmarshaller(Class<?> clazz) throws JAXBException {

Projects:
feign/tree/master/jaxb-jakarta
feign/tree/master/jaxb

Classes:
feign.jaxb.JAXBContextFactory
feign.jaxb.JAXBDecoder
feign.jaxb.JAXBEncoder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions