This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/commons-xml.git
The following commit(s) were added to refs/heads/main by this push:
new 77d6bc2 Javadoc: Propagate RuntimeException from
XPathFactory.newInstance()
77d6bc2 is described below
commit 77d6bc29a4ca2f3ba51435a60ccd3c38bb34d059
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Aug 26 12:48:58 2026 -0400
Javadoc: Propagate RuntimeException from XPathFactory.newInstance()
---
src/main/java/org/apache/commons/xml/XmlFactories.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/xml/XmlFactories.java
b/src/main/java/org/apache/commons/xml/XmlFactories.java
index e6ae9ac..5d1ca42 100644
--- a/src/main/java/org/apache/commons/xml/XmlFactories.java
+++ b/src/main/java/org/apache/commons/xml/XmlFactories.java
@@ -197,7 +197,8 @@ public static XMLInputFactory newXMLInputFactory() {
* </p>
*
* @return A hardened factory.
- * @throws IllegalStateException if a required hardening setting cannot be
applied to the underlying implementation.
+ * @throws IllegalStateException Thrown if a required hardening setting
cannot be applied to the underlying implementation.
+ * @throws RuntimeException Thrown if there is a failure in creating
an {@link XPathFactory} for the default object model.
*/
public static XPathFactory newXPathFactory() {
return XPathHardener.harden(XPathFactory.newInstance());