RFR: 8276141: XPathFactory set/getProperty method [v2]

Alan Bateman alanb at openjdk.java.net
Fri Nov 5 11:06:21 UTC 2021


On Wed, 3 Nov 2021 01:10:46 GMT, Joe Wang <joehw at openjdk.org> wrote:

>> Add setProperty/getProperty methods to the XPath API so that properties can be supported in the future.
>
> Joe Wang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add default impl; Add tests.

src/java.xml/share/classes/javax/xml/xpath/XPathFactory.java line 406:

> 404:      * @implSpec
> 405:      * The default implementation in the XPath API throws
> 406:      * {@link java.lang.UnsupportedOperationException}.

I think you can drop "in the XPath API" from the sentence.

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.

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

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


More information about the core-libs-dev mailing list