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
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.
The text was updated successfully, but these errors were encountered:
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
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
XMLStreamException
s, there are reports that some issues with DOCTYPE declaration are instead reported usingjava.util. MissingResourceException
(subtype ofRuntimeException
).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
RuntimeException
s from that particular spot, to reduce the likelihood that caller leaks exception.The text was updated successfully, but these errors were encountered: