Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8284400

Improve XPath exception handling

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 7, 8, 11, 17, 18, 19
    • xml
    • None
    • b25

      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.

            joehw Joe Wang
            joehw Joe Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: