[jira] [Commented] (XMLCOMMONS-87) XMLStreamException not calling "super(th)" in constructors

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (XMLCOMMONS-87) XMLStreamException not calling "super(th)" in constructors

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/XMLCOMMONS-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352686#comment-14352686 ]

Ortwin Glück commented on XMLCOMMONS-87:

Even the XMLStreamException from JDK-1.6 does that nowadays. I wonder why we are stuck with this ancient copy in xml-apis.jar which has lower quality than the JDK.

> XMLStreamException not calling "super(th)" in constructors
> ----------------------------------------------------------
>                 Key: XMLCOMMONS-87
>                 URL: https://issues.apache.org/jira/browse/XMLCOMMONS-87
>             Project: XML Commons
>          Issue Type: Bug
>          Components: XML Commons External (StAX)
>    Affects Versions: XML Commons External 1.4.01
>            Reporter: Ortwin Glück
> The XMLStreamException in spec stax-api 1.2 is not calling the super(th) or super(msg, th) for the constructors that take a throwable. There are two problems this causes:
> 1) The "cause" is never set so the exception.getCause() always returns null and potentially important information in the cause is discarded.
> 2) For the super(th) one, no message is set at all. Thus, all information that could be useful is lost unless I specifically cast the exception to an XMLStreamException and call the getNestedException(). Any generic exception handling mechanism would not be able to provide a useful error message.
> see also GERONIMO-6509, apparently the fix has never been upstreamed.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]