On Fri, 5 Nov 2021 17:08:02 GMT, Joe Wang <jo...@openjdk.org> wrote:

>> src/java.xml/share/classes/javax/xml/xpath/XPathFactory.java line 412:
>> 
>>> 410:      *
>>> 411:      * @throws XPathFactoryConfigurationException if the property name 
>>> is not
>>> 412:      * recognized
>> 
>> Are you sure XPathFactoryConfigurationException is the right exception here? 
>> This exception suggests "a configuration error in a XPathFactory 
>> environment". I would expect something like IllegalArgumentException here.
>
> Agree, IAE would have been more appropriate. The only reason I went with XCE 
> was consistency among the XPath API. It's unfortunate it has not been 
> consistent among the XML libs. The DOM/StAX/XSLT went with IAE,  
> SAX/Validation SAXNotRecognizedException and SAXNotSupportedException, and 
> then XPath XCE which was designed for config error. But if we don't plan to 
> fix XPathFactory::set/getFeature, should we go with sth different for the 
> property methods?

Roger also suggested changing to IAE. I've just pushed a change to IAE. Thanks.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6215

Reply via email to