File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
src/test-jdk17/java/com/fasterxml/jackson/dataformat/xml/records Expand file tree Collapse file tree 2 files changed +31
-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 1+ package com .fasterxml .jackson .dataformat .xml .records ;
2+
3+ import org .junit .jupiter .api .Test ;
4+
5+ import com .fasterxml .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