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
commit c88ea1e366639cdf1ea42ac16602f97cea6c2a2b Author: Gary Gregory <[email protected]> AuthorDate: Fri Aug 28 14:07:02 2026 -0400 Javadoc: "hardened" -> "secured" wording to match new class and method names. --- .../org/apache/commons/xml/SecureXPathFactory.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/apache/commons/xml/SecureXPathFactory.java b/src/main/java/org/apache/commons/xml/SecureXPathFactory.java index d1bf0a5..980534e 100644 --- a/src/main/java/org/apache/commons/xml/SecureXPathFactory.java +++ b/src/main/java/org/apache/commons/xml/SecureXPathFactory.java @@ -29,7 +29,7 @@ import javax.xml.xpath.XPathVariableResolver; /** - * Creates new, hardened {@link XPathFactory} instances. + * Creates new, secure {@link XPathFactory} instances. * <p> * Beyond the three universal guarantees on {@link org.apache.commons.xml}, URI-fetching XPath 3.1+ functions ({@code doc()}, {@code collection()}, * {@code unparsed-text()}) are not resolved. @@ -40,7 +40,7 @@ * </p> * <p> * Not a {@link XPathFactory} itself, so none of the JAXP static factory methods is inherited: a caller cannot reach a non-hardened factory through this class - * by calling an inherited method such as {@code newDefaultInstance()}. The hardened factories are instances of a nested, non-public wrapper class. + * by calling an inherited method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper class. * </p> * * @see org.apache.commons.xml @@ -68,12 +68,12 @@ public final class SecureXPathFactory { * <li><strong>FSP</strong> ({@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING}): required. It is the only knob both the stock JDK and Xalan XPath * engines expose, and switches on their secure-processing limits. {@link XPathFactory} has no attribute API for finer control.</li> * <li><strong>The nested wrapper</strong>: required. FSP governs only the engine, not the parser it provisions internally for the - * {@link org.xml.sax.InputSource}-taking {@code evaluate} entry points; the wrapper performs that document build with a hardened parser instead, so + * {@link org.xml.sax.InputSource}-taking {@code evaluate} entry points; the wrapper performs that document build with a secure parser instead, so * the engine never parses.</li> * </ul> * * @param factory The factory to harden. - * @return A new hardened factory or the original factory, hardened, if it is a known Saxon factory. + * @return A new secure factory or the original factory, hardened, if it is a known Saxon factory. * @throws SecureException Thrown if this {@link XPathFactory} or the {@code XPath}s it creates cannot support this feature. */ static XPathFactory secure(final XPathFactory factory) { @@ -88,13 +88,13 @@ static XPathFactory secure(final XPathFactory factory) { } /** - * Returns a new, hardened {@link XPathFactory} of the system-default implementation, supporting the default XPath object model. + * Returns a new, secure {@link XPathFactory} of the system-default implementation, supporting the default XPath object model. * <p> * Obtained as by {@code XPathFactory.newDefaultInstance()} where the platform provides it (Java 9 or later), and by instantiating the JDK's built-in * implementation directly on Java 8. * </p> * - * @return A hardened factory. + * @return A secure factory. * @throws IllegalStateException Thrown if a required hardening setting cannot be applied to the underlying implementation. * @throws RuntimeException Thrown if the running platform provides neither {@code newDefaultInstance()} nor the JDK's built-in implementation (for * example Android). @@ -123,9 +123,9 @@ public static XPathFactory newDefaultInstance() { } /** - * Returns a new, hardened {@link XPathFactory} for the default XPath object model. + * Returns a new, secure {@link XPathFactory} for the default XPath object model. * - * @return A hardened factory. + * @return A secure factory. * @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. */ @@ -134,10 +134,10 @@ public static XPathFactory newInstance() { } /** - * Returns a new, hardened {@link XPathFactory} for the given object model. + * Returns a new, secure {@link XPathFactory} for the given object model. * * @param uri The underlying object model identifier, as accepted by {@link XPathFactory#newInstance(String)}. - * @return A hardened factory. + * @return A secure factory. * @throws IllegalStateException Thrown if a required hardening setting cannot be applied to the underlying implementation. * @throws XPathFactoryConfigurationException Thrown if no implementation of the object model is available. * @throws NullPointerException Thrown if {@code uri} is {@code null}. @@ -148,12 +148,12 @@ public static XPathFactory newInstance(final String uri) throws XPathFactoryConf } /** - * Returns a new, hardened {@link XPathFactory} of the given implementation class. + * Returns a new, secure {@link XPathFactory} of the given implementation class. * * @param uri The underlying object model identifier, as accepted by {@link XPathFactory#newInstance(String)}. * @param factoryClassName The fully qualified class name of the {@link XPathFactory} implementation. * @param classLoader The class loader used to load the factory class; {@code null} means the current thread's context class loader. - * @return A hardened factory. + * @return A secure factory. * @throws IllegalStateException Thrown if a required hardening setting cannot be applied to the underlying implementation. * @throws XPathFactoryConfigurationException Thrown if {@code factoryClassName} is {@code null}, or if the factory class cannot be loaded or * instantiated, or does not support {@code uri}. @@ -191,7 +191,7 @@ private SecureXPathFactory() { * * <p>Required because {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} on the factory governs only the XPath engine: the stock JDK and Apache Xalan * implement the {@link org.xml.sax.InputSource}-taking {@code evaluate} entry points by provisioning an internal document parser the feature does not reach. - * The wrapper performs that document build itself through a hardened parser instead; see {@link SecureXPath}.</p> + * The wrapper performs that document build itself through a secure parser instead; see {@link SecureXPath}.</p> * * @see org.apache.commons.xml */
