You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Dennis Sosnoski (JIRA)" <ji...@apache.org> on 2006/10/17 18:49:35 UTC
[jira] Created: (WSCOMMONS-111) Careless exception handling needs
to be fixed
Careless exception handling needs to be fixed
---------------------------------------------
Key: WSCOMMONS-111
URL: http://issues.apache.org/jira/browse/WSCOMMONS-111
Project: WS-Commons
Issue Type: Bug
Components: AXIOM
Reporter: Dennis Sosnoski
org.apache.axiom.om.impl.builder.StAXOMBuilder.next() catches all exceptions and rethrows them as OMExceptions (line 199) while other code assumes any OMExceptions just mean that the end of the document has been reached (for example, org.apache.axiom.om.impl.traverse.next(), line 117, which just sets a flag). This means that any coding errors which result in runtime exceptions will be masked.
In the case I've been tracking, an error in org.apache.axiom.soap.impl.builder.SOAPBuilderHelper.processAttributes (not checking for a null namespace uri) resulted in a NullPointerException, which was masked by this code and led to an element being missing from Fault details.
If this code needs to catch particular exceptions these exceptions should be individually checked. If this is impractical, at an absolute minimum this should check for a RuntimeException subclass and just rethrow it rather than masking it as an OMException.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org
[jira] Updated: (WSCOMMONS-111) Careless exception handling needs
to be fixed
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen updated WSCOMMONS-111:
--------------------------------------
Fix Version/s: Axiom 1.2.8
Assignee: Andreas Veithen
> Careless exception handling needs to be fixed
> ---------------------------------------------
>
> Key: WSCOMMONS-111
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-111
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Dennis Sosnoski
> Assignee: Andreas Veithen
> Fix For: Axiom 1.2.8
>
>
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next() catches all exceptions and rethrows them as OMExceptions (line 199) while other code assumes any OMExceptions just mean that the end of the document has been reached (for example, org.apache.axiom.om.impl.traverse.next(), line 117, which just sets a flag). This means that any coding errors which result in runtime exceptions will be masked.
> In the case I've been tracking, an error in org.apache.axiom.soap.impl.builder.SOAPBuilderHelper.processAttributes (not checking for a null namespace uri) resulted in a NullPointerException, which was masked by this code and led to an element being missing from Fault details.
> If this code needs to catch particular exceptions these exceptions should be individually checked. If this is impractical, at an absolute minimum this should check for a RuntimeException subclass and just rethrow it rather than masking it as an OMException.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WSCOMMONS-111) Careless exception handling needs
to be fixed
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen updated WSCOMMONS-111:
--------------------------------------
Priority: Minor (was: Major)
Fix Version/s: (was: Axiom 1.2.8)
Axiom 1.2.9
The issue with org.apache.axiom.om.impl.traverse.OMChildrenIterator#next() has been fixed (see WSCOMMONS-372). I also agree that StAXOMBuilder.next() should not intercept runtime exceptions. Indeed it doesn't make much sense to intercept a NullPointerException and wrap it in an OMException, since this will only obscure the root cause of the problem. I changed the exception handling in StAXOMBuilder.next(), but this causes failures in the Axis2 test suite, so I will not commit this change for the moment. Since Axis2 has now entered the release process for version 1.5, I postpone the fix for this Axiom issue to the next minor release, i.e. 1.2.9. Also, since the primary issue (the behavior of OMChildrenIterator#next()) has been fixed, I downgrade the priority to minor.
> Careless exception handling needs to be fixed
> ---------------------------------------------
>
> Key: WSCOMMONS-111
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-111
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Dennis Sosnoski
> Assignee: Andreas Veithen
> Priority: Minor
> Fix For: Axiom 1.2.9
>
>
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next() catches all exceptions and rethrows them as OMExceptions (line 199) while other code assumes any OMExceptions just mean that the end of the document has been reached (for example, org.apache.axiom.om.impl.traverse.next(), line 117, which just sets a flag). This means that any coding errors which result in runtime exceptions will be masked.
> In the case I've been tracking, an error in org.apache.axiom.soap.impl.builder.SOAPBuilderHelper.processAttributes (not checking for a null namespace uri) resulted in a NullPointerException, which was masked by this code and led to an element being missing from Fault details.
> If this code needs to catch particular exceptions these exceptions should be individually checked. If this is impractical, at an absolute minimum this should check for a RuntimeException subclass and just rethrow it rather than masking it as an OMException.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WSCOMMONS-111) Careless exception handling needs
to be fixed
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen updated WSCOMMONS-111:
--------------------------------------
Attachment: axis2-test-report.txt
Attached the report showing the test failures in Axis2 (jaxws-integration module) that would be triggered by the change in exception handling in StAXOMBuilder.next() described above.
> Careless exception handling needs to be fixed
> ---------------------------------------------
>
> Key: WSCOMMONS-111
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-111
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Dennis Sosnoski
> Assignee: Andreas Veithen
> Priority: Minor
> Fix For: Axiom 1.2.9
>
> Attachments: axis2-test-report.txt
>
>
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next() catches all exceptions and rethrows them as OMExceptions (line 199) while other code assumes any OMExceptions just mean that the end of the document has been reached (for example, org.apache.axiom.om.impl.traverse.next(), line 117, which just sets a flag). This means that any coding errors which result in runtime exceptions will be masked.
> In the case I've been tracking, an error in org.apache.axiom.soap.impl.builder.SOAPBuilderHelper.processAttributes (not checking for a null namespace uri) resulted in a NullPointerException, which was masked by this code and led to an element being missing from Fault details.
> If this code needs to catch particular exceptions these exceptions should be individually checked. If this is impractical, at an absolute minimum this should check for a RuntimeException subclass and just rethrow it rather than masking it as an OMException.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WSCOMMONS-111) Careless exception handling needs
to be fixed
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen resolved WSCOMMONS-111.
---------------------------------------
Resolution: Fixed
Fixed in r944348.
> Careless exception handling needs to be fixed
> ---------------------------------------------
>
> Key: WSCOMMONS-111
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-111
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Dennis Sosnoski
> Assignee: Andreas Veithen
> Priority: Minor
> Fix For: Axiom 1.2.9
>
> Attachments: axis2-test-report.txt
>
>
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next() catches all exceptions and rethrows them as OMExceptions (line 199) while other code assumes any OMExceptions just mean that the end of the document has been reached (for example, org.apache.axiom.om.impl.traverse.next(), line 117, which just sets a flag). This means that any coding errors which result in runtime exceptions will be masked.
> In the case I've been tracking, an error in org.apache.axiom.soap.impl.builder.SOAPBuilderHelper.processAttributes (not checking for a null namespace uri) resulted in a NullPointerException, which was masked by this code and led to an element being missing from Fault details.
> If this code needs to catch particular exceptions these exceptions should be individually checked. If this is impractical, at an absolute minimum this should check for a RuntimeException subclass and just rethrow it rather than masking it as an OMException.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.