JAVA-27775 Fix failing module xml-2 (#15430)
This commit is contained in:
parent
f7d5d62a57
commit
63312fbcf9
4
pom.xml
4
pom.xml
@ -905,7 +905,7 @@
|
|||||||
<module>vertx-modules</module>
|
<module>vertx-modules</module>
|
||||||
<module>web-modules</module>
|
<module>web-modules</module>
|
||||||
<module>webrtc</module>
|
<module>webrtc</module>
|
||||||
<!--<module>xml-2</module>--><!-- failing after upgrading to jdk17-->
|
<module>xml-2</module>
|
||||||
<module>xml</module>
|
<module>xml</module>
|
||||||
<module>xstream</module>
|
<module>xstream</module>
|
||||||
</modules>
|
</modules>
|
||||||
@ -1154,7 +1154,7 @@
|
|||||||
<module>vertx-modules</module>
|
<module>vertx-modules</module>
|
||||||
<module>web-modules</module>
|
<module>web-modules</module>
|
||||||
<module>webrtc</module>
|
<module>webrtc</module>
|
||||||
<!--<module>xml-2</module>--><!-- failing after upgrading to jdk17-->
|
<module>xml-2</module>
|
||||||
<module>xml</module>
|
<module>xml</module>
|
||||||
<module>xstream</module>
|
<module>xstream</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
@ -41,15 +41,15 @@ public class JsonToXmlUnitTest {
|
|||||||
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);
|
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);
|
||||||
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_1_1, true);
|
xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_1_1, true);
|
||||||
String xmlString = xmlMapper.writer().withRootName("root").withDefaultPrettyPrinter().writeValueAsString(jsonNode);
|
String xmlString = xmlMapper.writer().withRootName("root").withDefaultPrettyPrinter().writeValueAsString(jsonNode);
|
||||||
Assertions.assertEquals("<?xml version='1.1' encoding='UTF-8'?>\n" +
|
Assertions.assertEquals("<?xml version='1.1' encoding='UTF-8'?>" + System.lineSeparator() +
|
||||||
"<root>\n" +
|
"<root>" + System.lineSeparator() +
|
||||||
" <name>John</name>\n" +
|
" <name>John</name>" + System.lineSeparator() +
|
||||||
" <age>20</age>\n" +
|
" <age>20</age>" + System.lineSeparator() +
|
||||||
" <address>\n" +
|
" <address>" + System.lineSeparator() +
|
||||||
" <street>Wall Street</street>\n" +
|
" <street>Wall Street</street>" + System.lineSeparator() +
|
||||||
" <city>New York</city>\n" +
|
" <city>New York</city>" + System.lineSeparator() +
|
||||||
" </address>\n" +
|
" </address>" + System.lineSeparator() +
|
||||||
"</root>\n", xmlString);
|
"</root>" + System.lineSeparator(), xmlString);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user