Skip to content
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

Wrap Xerces/Stax (JDK-bundled) exceptions during parser initialization #350

Closed
cowtowncoder opened this issue Jul 18, 2019 · 0 comments
Closed
Milestone

Comments

@cowtowncoder
Copy link
Member

Although XML module works best when used over Woodstox or Aalto, ideally any Stax parser implementation should work for basic usage. So use of JDK-bundled Stax processor (which is nowadays based on Xerces it seems) should be supported.

But although all problems should be reported as XMLStreamExceptions, there are reports that some issues with DOCTYPE declaration are instead reported using java.util. MissingResourceException (subtype of RuntimeException).
This can lead to leakage from method XmlFactory._initializeXmlReader().

It's not unclear what'd be the best approach balancing minimal intervention and safety, but for now maybe wrap all RuntimeExceptions from that particular spot, to reduce the likelihood that caller leaks exception.

@cowtowncoder cowtowncoder added 2.9 and removed 2.9 labels Jul 18, 2019
@cowtowncoder cowtowncoder changed the title Add limited support for catching Xerces/Stax (JDK-bundled) issues that are not reported properly Wrap Xerces/Stax (JDK-bundled) exceptions during parser initialization Jul 18, 2019
@cowtowncoder cowtowncoder added this to the 2.10.0 milestone Jul 18, 2019
cowtowncoder added a commit that referenced this issue Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant