File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed
src/test/java/com/fasterxml/jackson/dataformat/xml/misc Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe
83
83
<dependency >
84
84
<groupId >com.fasterxml.woodstox</groupId >
85
85
<artifactId >woodstox-core</artifactId >
86
- <version >6.0.1 </version >
86
+ <version >6.0.2 </version >
87
87
<exclusions >
88
88
<exclusion >
89
89
<groupId >javax.xml.stream</groupId >
Original file line number Diff line number Diff line change @@ -4,6 +4,14 @@ Project: jackson-dataformat-xml
4
4
= Releases
5
5
------------------------------------------------------------------------
6
6
7
+ 2.11.0 (not yet released)
8
+
9
+ -
10
+
11
+ 2.10.1 (not yet released)
12
+
13
+ - Upgrade Woodstox dependency to 6.0.2
14
+
7
15
2.10.0 (26 -Sep-2019 )
8
16
9
17
#242 : Deserialization of class inheritance depends on attributes order
Original file line number Diff line number Diff line change 1
1
package com .fasterxml .jackson .dataformat .xml .misc ;
2
2
3
+ import java .io .StringWriter ;
4
+
3
5
import javax .xml .stream .*;
4
6
5
7
import com .ctc .wstx .stax .WstxInputFactory ;
@@ -46,7 +48,7 @@ public String getName() {
46
48
}
47
49
}
48
50
49
- public void testIssue311 () throws Exception {
51
+ public void testIssue326 () throws Exception {
50
52
XMLOutputFactory xmlOutputFactory = new WstxOutputFactory ();
51
53
52
54
/* Setting this to true makes the application run but does not write namespace */
@@ -61,12 +63,16 @@ public void testIssue311() throws Exception {
61
63
.enable (SerializationFeature .INDENT_OUTPUT )
62
64
.build ();
63
65
64
- XMLStreamWriter writer = xmlOutputFactory .createXMLStreamWriter (System .out );
65
-
66
+ StringWriter sw = new StringWriter ();
67
+
68
+ XMLStreamWriter writer = xmlOutputFactory .createXMLStreamWriter (sw );
66
69
startDocument (writer );
67
- Bean bean = new Bean (1 , "Dude" );
70
+ Bean bean = new Bean (1 , "Dude" );
68
71
mapper .writeValue (writer , bean );
69
72
endDocument (writer );
73
+
74
+ final String xml = sw .toString ();
75
+ assertNotNull (xml ); // just to remove IDE Warning of unused...
70
76
}
71
77
72
78
protected void startDocument (XMLStreamWriter writer ) throws XMLStreamException {
You can’t perform that action at this time.
0 commit comments