Skip to content

Commit 99c4423

Browse files
committed
...
1 parent 5436c9b commit 99c4423

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff 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>

src/test/java/com/fasterxml/jackson/dataformat/xml/failing/FailingNamespace326Test.java

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.fasterxml.jackson.dataformat.xml.failing;
22

3+
import java.io.StringWriter;
4+
35
import javax.xml.stream.*;
46

57
import 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 {

0 commit comments

Comments
 (0)