-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing XML DTD/Entity file resource causes ClassCastException #700
Comments
Just as a heads up to help with any future merging, I think there is also a possibly less elegant fix for this in my XML module review PR. |
Thanks @david-russo, we have a second pair of hands here at OPF towers and less on our plate. We will be working through the PRs here some this month. |
Thanks Carl, this solves our problem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: