You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An XML file starting with a DTD declaration such as <!DOCTYPE art SYSTEM "article.dtd"> causes the XML-hul module to fail
and report a "Not well-formed" status:
Status: Not well-formed
ErrorMessage: SaxParseException: java.lang.ClassCastException: class sun.net.www.protocol.file.FileURLConnection cannot be cast to class java.net.HttpURLConnection(sun.net.www.protocol.file.FileURLConnection and java.net.HttpURLConnection are in module java.base of loader 'bootstrap'): SAXException cause: java.lang.ClassCastException
ID: XML-HUL-3
This is caused by a failure in the XMLModuleHandler.resolveEntity method which fails to detect that the URL is a file type and then trys to cast the obj variable, a FileURLConnection instance, to HttpURLConnection causing the exception.
This branch has the beginings of a fix. This takes a simpler approach, rather than casting the URL instance it uses the URL.openStream method. It also catches any IOException and returns null, to "require default behaviour".
An XML file starting with a DTD declaration such as
<!DOCTYPE art SYSTEM "article.dtd">
causes theXML-hul
module to failand report a "Not well-formed" status:
This is caused by a failure in the
XMLModuleHandler.resolveEntity
method which fails to detect that the URL is a file type and then trys to cast theobj
variable, aFileURLConnection
instance, toHttpURLConnection
causing the exception.This branch has the beginings of a fix. This takes a simpler approach, rather than casting the
URL
instance it uses theURL.openStream
method. It also catches anyIOException
and returnsnull
, to "require default behaviour".Reported by @samalloing
The text was updated successfully, but these errors were encountered: