-
-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Milestone
Description
Affected version: all versions (up to jackson-dataformat-xml-2.9.0.pr3)
Currently, if you create an instance of XmlMapper and register a module with it, any copies of that mapper will not contain the registered module. This behavior is different from the behavior of ObjectMapper
, which retains all other configurations, such as modules, serialization/deserialization configs, etc.
final XmlMapper mapper = new XmlMapper();
mapper.registerModule(new JaxbAnnotationModule());
final XmlMapper mapperWithoutModule = mapper.copy();
I think this could be easily resolved by following the same copy-constructor pattern that ObjectMapper
uses to copy itself, and then just invoking super's constructor in XmlMapper
's copy constructor.
I'll have a PR up shortly.
Metadata
Metadata
Assignees
Labels
No labels