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
4
4
=== Releases ===
5
5
------------------------------------------------------------------------
6
6
7
+ #508 : `XmlMapper` is unable to deserialise into an empty record
8
+ (reported by @protazy)
7
9
#745 : Add feature to include `standalone=' yes' ` in xml declaration
8
10
(contributed by @duoduobingbing)
9
11
Original file line number Diff line number Diff line change 52
52
opens tools .jackson .dataformat .xml .lists ;
53
53
opens tools .jackson .dataformat .xml .misc ;
54
54
opens tools .jackson .dataformat .xml .node ;
55
+ opens tools .jackson .dataformat .xml .records ;
55
56
opens tools .jackson .dataformat .xml .stream ;
56
57
opens tools .jackson .dataformat .xml .tofix ;
57
58
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