Skip to content

Commit

Permalink
Merge pull request #453 from codacy/TS-261-compatible-with-java-17-grt
Browse files Browse the repository at this point in the history
Change SAXParserFactory to a one compatible with java 17 and greater
  • Loading branch information
rubencodacy authored Feb 23, 2023
2 parents fddc44e + 3b17a3e commit 854582b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.codacy.parsers.util

import scala.xml.factory.XMLLoader
import javax.xml.parsers.SAXParserFactory
import scala.xml.{Elem, SAXParser}

object XMLoader extends XMLLoader[Elem] {

override def parser: SAXParser = {
val f = new com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl()
val f = SAXParserFactory.newInstance()
f.setNamespaceAware(false)
f.setValidating(false)
f.setFeature("http://xml.org/sax/features/namespaces", false)
Expand Down

0 comments on commit 854582b

Please sign in to comment.