Skip to content

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

@cowtowncoder

Description

@cowtowncoder

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions