Skip to content

Commit

Permalink
DocumentBuilderFactory.newDefaultInstance is not available in jvm 8. Use
Browse files Browse the repository at this point in the history
newInstance instead.
  • Loading branch information
pdvrieze committed Jan 11, 2022
1 parent 7d8204b commit 94774b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -38,7 +38,7 @@ private fun <T> XmlTestBase<T>.testDomSerializeXmlImpl(baseXmlFormat: XML) {
baseXmlFormat.encodeToWriter(writer, serializer, value)
writer.target
val expectedDom: Document = DocumentBuilderFactory
.newDefaultInstance()
.newInstance()
.apply { isNamespaceAware = true }
.newDocumentBuilder()
.parse(InputSource(StringReader(expectedXML)))
Expand All @@ -47,7 +47,7 @@ private fun <T> XmlTestBase<T>.testDomSerializeXmlImpl(baseXmlFormat: XML) {

private fun <T> XmlTestBase<T>.testDomDeserializeXmlImpl(baseXmlFormat: nl.adaptivity.xmlutil.serialization.XML) {
val expectedDom: Document = DocumentBuilderFactory
.newDefaultInstance()
.newInstance()
.apply { isNamespaceAware = true }
.newDocumentBuilder()
.parse(InputSource(StringReader(expectedXML)))
Expand Down
Expand Up @@ -39,7 +39,7 @@ private fun <T> XmlTestBase<T>.testDomSerializeXmlImpl(baseXmlFormat: XML) {
baseXmlFormat.encodeToWriter(writer, serializer, value)
writer.target
val expectedDom: Document = DocumentBuilderFactory
.newDefaultInstance()
.newInstance()
.apply { isNamespaceAware = true }
.newDocumentBuilder()
.parse(InputSource(StringReader(expectedXML)))
Expand All @@ -48,7 +48,7 @@ private fun <T> XmlTestBase<T>.testDomSerializeXmlImpl(baseXmlFormat: XML) {

private fun <T> XmlTestBase<T>.testDomDeserializeXmlImpl(baseXmlFormat: nl.adaptivity.xmlutil.serialization.XML) {
val expectedDom: Document = DocumentBuilderFactory
.newDefaultInstance()
.newInstance()
.apply { isNamespaceAware = true }
.newDocumentBuilder()
.parse(InputSource(StringReader(expectedXML)))
Expand Down

0 comments on commit 94774b4

Please sign in to comment.