File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
src/test/java/com/fasterxml/jackson/dataformat/xml/failing Expand file tree Collapse file tree 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
8787 <dependency >
8888 <groupId >com.fasterxml.woodstox</groupId >
8989 <artifactId >woodstox-core</artifactId >
90- <version >6.0.1 </version >
90+ <version >6.0.2 </version >
9191 <exclusions >
9292 <exclusion >
9393 <groupId >javax.xml.stream</groupId >
Original file line number Diff line number Diff line change 11package com .fasterxml .jackson .dataformat .xml .failing ;
22
3+ import java .io .StringWriter ;
4+
35import javax .xml .stream .*;
46
57import com .ctc .wstx .stax .WstxInputFactory ;
@@ -46,7 +48,7 @@ public String getName() {
4648 }
4749 }
4850
49- public void testIssue311 () throws Exception {
51+ public void testIssue326 () throws Exception {
5052 XMLInputFactory xmlInputFactory = new WstxInputFactory ();
5153 XMLOutputFactory xmlOutputFactory = new WstxOutputFactory ();
5254
@@ -56,12 +58,16 @@ public void testIssue311() throws Exception {
5658 XmlMapper mapper = new XmlMapper (xmlInputFactory );
5759 mapper .enable (SerializationFeature .INDENT_OUTPUT );
5860
59- XMLStreamWriter writer = xmlOutputFactory .createXMLStreamWriter (System .out );
60-
61+ StringWriter sw = new StringWriter ();
62+
63+ XMLStreamWriter writer = xmlOutputFactory .createXMLStreamWriter (sw );
6164 startDocument (writer );
62- Bean bean = new Bean (1 , "Dude" );
65+ Bean bean = new Bean (1 , "Dude" );
6366 mapper .writeValue (writer , bean );
6467 endDocument (writer );
68+
69+ final String xml = sw .toString ();
70+ assertNotNull (xml ); // just to remove IDE Warning of unused...
6571 }
6672
6773 protected void startDocument (XMLStreamWriter writer ) throws XMLStreamException {
You can’t perform that action at this time.
0 commit comments