File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
tools/jackson/dataformat/xml/records Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ Project: jackson-dataformat-xml
44=== Releases ===
55------------------------------------------------------------------------
66
7+ #508 : `XmlMapper` is unable to deserialise into an empty record
8+ (reported by @protazy)
79#745 : Add feature to include `standalone=' yes' ` in xml declaration
810 (contributed by @duoduobingbing)
911
Original file line number Diff line number Diff line change 5252 opens tools .jackson .dataformat .xml .lists ;
5353 opens tools .jackson .dataformat .xml .misc ;
5454 opens tools .jackson .dataformat .xml .node ;
55+ opens tools .jackson .dataformat .xml .records ;
5556 opens tools .jackson .dataformat .xml .stream ;
5657 opens tools .jackson .dataformat .xml .tofix ;
5758 opens tools .jackson .dataformat .xml .tofix .records ;
Original file line number Diff line number Diff line change 1+ package tools .jackson .dataformat .xml .records ;
2+
3+ import org .junit .jupiter .api .Test ;
4+
5+ import tools .jackson .dataformat .xml .*;
6+
7+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
8+
9+ // [dataformat-xml#508]
10+ public class XmlEmptyRecordDeser508Test extends XmlTestUtil
11+ {
12+ static class EmptyClass508 {
13+ }
14+
15+ public record EmptyRecord508 () {
16+ }
17+
18+ private final XmlMapper MAPPER = new XmlMapper ();
19+
20+ @ Test
21+ public void testEmptyPOJO () throws Exception {
22+ assertNotNull (MAPPER .readValue ("<EmptyClass508/>" , EmptyClass508 .class ));
23+ }
24+
25+ @ Test
26+ public void testEmptyRecord () throws Exception {
27+ assertNotNull (MAPPER .readValue ("<EmptyRecord508/>" , EmptyRecord508 .class ));
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments