-
-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Milestone
Description
Describe the bug
SequenceWriter returns NPE when trying XML serialization.
Version information
2.11.2
To Reproduce
If you have a way to reproduce this with:
ByteArrayOutputStream OUTPUT_STREAM = new ByteArrayOutputStream();
ObjectMapper xmlMapper = new XmlMapper();
SequenceWriter seqWriter = xmlMapper.writer().writeValues(OUTPUT_STREAM);
Map<String, String> reportObject = new HashMap<>();
reportObject.put("a", "b");
seqWriter.write(reportObject);
Expected behavior
Additional context
Stack trace:
java.lang.NullPointerException
at com.fasterxml.jackson.dataformat.xml.util.XmlRootNameLookup.findRootName(XmlRootNameLookup.java:41)
at com.fasterxml.jackson.dataformat.xml.ser.XmlSerializerProvider.serializeValue(XmlSerializerProvider.java:148)
at com.fasterxml.jackson.databind.SequenceWriter.write(SequenceWriter.java:153)
Metadata
Metadata
Assignees
Labels
No labels