The XPath API defines mainly three type of Exceptions that may be thrown during compilation and evaluation: NPE, IAE and XPathExpressionException. The Impl however, likely due to the need to share components with Xalan, sometimes throw RuntimeException, for example when DTMs are in the middle of the stack. These REs need to be caught and handled to be compliant with the spec.
In other cases, the Impl missed certain situations where potential errors may happen, e.g. given an invalid expression.
There are many places where a clean-up may help to reduce the usages of RuntimeException. However, that is not the main purpose of this report. Some cleanup within the classes touched by this improvement would be good to have.
In other cases, the Impl missed certain situations where potential errors may happen, e.g. given an invalid expression.
There are many places where a clean-up may help to reduce the usages of RuntimeException. However, that is not the main purpose of this report. Some cleanup within the classes touched by this improvement would be good to have.