File tree 2 files changed +11
-5
lines changed
src/test/java/com/fasterxml/jackson/dataformat/xml/failing
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe
87
87
<dependency >
88
88
<groupId >com.fasterxml.woodstox</groupId >
89
89
<artifactId >woodstox-core</artifactId >
90
- <version >6.0.1 </version >
90
+ <version >6.0.2 </version >
91
91
<exclusions >
92
92
<exclusion >
93
93
<groupId >javax.xml.stream</groupId >
Original file line number Diff line number Diff line change 1
1
package com .fasterxml .jackson .dataformat .xml .failing ;
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
XMLInputFactory xmlInputFactory = new WstxInputFactory ();
51
53
XMLOutputFactory xmlOutputFactory = new WstxOutputFactory ();
52
54
@@ -56,12 +58,16 @@ public void testIssue311() throws Exception {
56
58
XmlMapper mapper = new XmlMapper (xmlInputFactory );
57
59
mapper .enable (SerializationFeature .INDENT_OUTPUT );
58
60
59
- XMLStreamWriter writer = xmlOutputFactory .createXMLStreamWriter (System .out );
60
-
61
+ StringWriter sw = new StringWriter ();
62
+
63
+ XMLStreamWriter writer = xmlOutputFactory .createXMLStreamWriter (sw );
61
64
startDocument (writer );
62
- Bean bean = new Bean (1 , "Dude" );
65
+ Bean bean = new Bean (1 , "Dude" );
63
66
mapper .writeValue (writer , bean );
64
67
endDocument (writer );
68
+
69
+ final String xml = sw .toString ();
70
+ assertNotNull (xml ); // just to remove IDE Warning of unused...
65
71
}
66
72
67
73
protected void startDocument (XMLStreamWriter writer ) throws XMLStreamException {
You can’t perform that action at this time.
0 commit comments