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-secure-xml.git
commit 2a70b09fb7e05da8062e4df5aae4f78b3c00267a Author: Gary Gregory <[email protected]> AuthorDate: Tue Sep 1 08:18:49 2026 -0400 Javadoc --- .../commons/xml/secure/SecureDocumentBuilderFactory.java | 12 ++++++------ .../apache/commons/xml/secure/SecureSAXParserFactory.java | 9 +++++---- .../org/apache/commons/xml/secure/SecureSchemaFactory.java | 9 +++++---- .../apache/commons/xml/secure/SecureTransformerFactory.java | 8 +++++--- .../org/apache/commons/xml/secure/SecureXMLInputFactory.java | 4 ++-- .../org/apache/commons/xml/secure/SecureXPathFactory.java | 9 +++++---- 6 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/apache/commons/xml/secure/SecureDocumentBuilderFactory.java b/src/main/java/org/apache/commons/xml/secure/SecureDocumentBuilderFactory.java index d693412..f56e727 100644 --- a/src/main/java/org/apache/commons/xml/secure/SecureDocumentBuilderFactory.java +++ b/src/main/java/org/apache/commons/xml/secure/SecureDocumentBuilderFactory.java @@ -33,14 +33,14 @@ * Creates new, secure {@link DocumentBuilderFactory} instances. * <p> * Beyond the three universal guarantees on {@link org.apache.commons.xml.secure}, XInclude resolution is denied by default. When - * {@link DocumentBuilderFactory#setXIncludeAware(boolean) setXIncludeAware(true)} is called on the returned factory, the parser will process - * {@code xi:include} elements but every external resource lookup is rejected. To permit specific trusted resources, install an - * {@link org.xml.sax.EntityResolver EntityResolver} on the {@link DocumentBuilder} that allow-lists them; any href the resolver does not explicitly allow - * stays blocked. + * {@link DocumentBuilderFactory#setXIncludeAware(boolean) setXIncludeAware(true)} is called on the returned factory, the parser will process {@code xi:include} + * elements but every external resource lookup is rejected. To permit specific trusted resources, install an {@link org.xml.sax.EntityResolver EntityResolver} + * on the {@link DocumentBuilder} that allow-lists them; any href the resolver does not explicitly allow stays blocked. * </p> * <p> - * Not a {@link DocumentBuilderFactory} itself, so none of the JAXP static factory methods is inherited: a caller cannot reach a non-secured factory through this class - * by calling an inherited method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper class. + * This class is not itself a {@link DocumentBuilderFactory}, so it inherits none of the static JAXP factory methods. A caller therefore cannot obtain an + * unsecured factory through this class by calling a method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public + * wrapper class. * </p> * * @see org.apache.commons.xml.secure diff --git a/src/main/java/org/apache/commons/xml/secure/SecureSAXParserFactory.java b/src/main/java/org/apache/commons/xml/secure/SecureSAXParserFactory.java index 06d320c..32ec386 100644 --- a/src/main/java/org/apache/commons/xml/secure/SecureSAXParserFactory.java +++ b/src/main/java/org/apache/commons/xml/secure/SecureSAXParserFactory.java @@ -42,12 +42,13 @@ * <p> * Beyond the three universal guarantees on {@link org.apache.commons.xml.secure}, XInclude resolution is denied by default. When * {@link SAXParserFactory#setXIncludeAware(boolean) setXIncludeAware(true)} is called on the returned factory, the parser will process {@code xi:include} - * elements but every external resource lookup is rejected. To permit specific trusted resources, install an {@link org.xml.sax.EntityResolver - * EntityResolver} on the {@link org.xml.sax.XMLReader} that allow-lists them; any href the resolver does not explicitly allow stays blocked. + * elements but every external resource lookup is rejected. To permit specific trusted resources, install an {@link org.xml.sax.EntityResolver EntityResolver} + * on the {@link org.xml.sax.XMLReader} that allow-lists them; any href the resolver does not explicitly allow stays blocked. * </p> * <p> - * Not a {@link SAXParserFactory} itself, so none of the JAXP static factory methods is inherited: a caller cannot reach a non-secured factory through this class - * by calling an inherited method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper class. + * This class is not itself a {@link SAXParserFactory}, so it inherits none of the static JAXP factory methods. A caller therefore cannot obtain an unsecured + * factory through this class by calling a method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper + * class. * </p> * * @see org.apache.commons.xml.secure diff --git a/src/main/java/org/apache/commons/xml/secure/SecureSchemaFactory.java b/src/main/java/org/apache/commons/xml/secure/SecureSchemaFactory.java index ffa0712..c5c2719 100644 --- a/src/main/java/org/apache/commons/xml/secure/SecureSchemaFactory.java +++ b/src/main/java/org/apache/commons/xml/secure/SecureSchemaFactory.java @@ -47,12 +47,13 @@ * <a href="https://xerces.apache.org/xerces2-j/properties.html#security-manager">security manager</a>, which caps that expansion at 3,000 nodes).</li> * </ul> * <p> - * The same guarantees apply to {@link javax.xml.validation.Validator} and {@link javax.xml.validation.ValidatorHandler} instances produced from the - * resulting {@link javax.xml.validation.Schema}. + * The same guarantees apply to {@link javax.xml.validation.Validator} and {@link javax.xml.validation.ValidatorHandler} instances produced from the resulting + * {@link javax.xml.validation.Schema}. * </p> * <p> - * Not a {@link SchemaFactory} itself, so none of the JAXP static factory methods is inherited: a caller cannot reach a non-secured factory through this class - * by calling an inherited method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper class. + * This class is not itself a {@link SchemaFactory}, so it inherits none of the static JAXP factory methods. A caller therefore cannot obtain an unsecured + * factory through this class by calling a method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper + * class. * </p> * * @see org.apache.commons.xml.secure diff --git a/src/main/java/org/apache/commons/xml/secure/SecureTransformerFactory.java b/src/main/java/org/apache/commons/xml/secure/SecureTransformerFactory.java index 7c3b903..01cec45 100644 --- a/src/main/java/org/apache/commons/xml/secure/SecureTransformerFactory.java +++ b/src/main/java/org/apache/commons/xml/secure/SecureTransformerFactory.java @@ -51,7 +51,8 @@ /** * Creates new, secure {@link TransformerFactory} instances. * <p> - * Beyond the three universal guarantees on {@link org.apache.commons.xml.secure}: {@code xsl:import}, {@code xsl:include} and {@code document()} URIs are not resolved. + * Beyond the three universal guarantees on {@link org.apache.commons.xml.secure}: {@code xsl:import}, {@code xsl:include} and {@code document()} URIs are not + * resolved. * </p> * <p> * The guarantees govern what the transform reads, not what it writes: an output instruction like {@code xsl:result-document} still writes wherever the @@ -74,8 +75,9 @@ * {@code newXMLFilter(..)}), if reachable by casting the returned factory, produce objects carrying the same guarantees. * </p> * <p> - * Not a {@link TransformerFactory} itself, so none of the JAXP static factory methods is inherited: a caller cannot reach a non-secured factory through this class - * by calling an inherited method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper class. + * This class is not itself a {@link TransformerFactory}, so it inherits none of the static JAXP factory methods. A caller therefore cannot obtain an unsecured + * factory through this class by calling a method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper + * class. * </p> * * @see org.apache.commons.xml.secure diff --git a/src/main/java/org/apache/commons/xml/secure/SecureXMLInputFactory.java b/src/main/java/org/apache/commons/xml/secure/SecureXMLInputFactory.java index 9ea052e..83ff383 100644 --- a/src/main/java/org/apache/commons/xml/secure/SecureXMLInputFactory.java +++ b/src/main/java/org/apache/commons/xml/secure/SecureXMLInputFactory.java @@ -40,8 +40,8 @@ * The three universal guarantees on {@link org.apache.commons.xml.secure} apply; StAX exposes no additional vectors beyond them. * </p> * <p> - * Not a {@link XMLInputFactory} itself, so none of the JAXP static factory methods is inherited: a caller cannot reach a non-secured factory through this class - * by calling an inherited method such as {@code newDefaultFactory()}. The secure factories are instances of a nested, non-public wrapper class. + * This class is not itself a {@link XMLInputFactory}, so it inherits none of the static JAXP factory methods. A caller therefore cannot obtain an unsecured + * factory through this class by calling a method such as {@code newDefaultFactory()}. The secure factories are instances of a nested, non-public wrapper class. * </p> * * @see org.apache.commons.xml.secure diff --git a/src/main/java/org/apache/commons/xml/secure/SecureXPathFactory.java b/src/main/java/org/apache/commons/xml/secure/SecureXPathFactory.java index 5e24c26..7065dab 100644 --- a/src/main/java/org/apache/commons/xml/secure/SecureXPathFactory.java +++ b/src/main/java/org/apache/commons/xml/secure/SecureXPathFactory.java @@ -34,12 +34,13 @@ * {@code unparsed-text()}) are not resolved. * </p> * <p> - * The guarantees also cover the document parse behind {@code XPath.evaluate(String, InputSource)} and {@code XPathExpression.evaluate(InputSource)}: the - * input document is built through a secure, namespace-aware {@link javax.xml.parsers.DocumentBuilder} instead of the engine's internal parser. + * The guarantees also cover the document parse behind {@code XPath.evaluate(String, InputSource)} and {@code XPathExpression.evaluate(InputSource)}: the input + * document is built through a secure, namespace-aware {@link javax.xml.parsers.DocumentBuilder} instead of the engine's internal parser. * </p> * <p> - * Not a {@link XPathFactory} itself, so none of the JAXP static factory methods is inherited: a caller cannot reach a non-secured factory through this class - * by calling an inherited method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper class. + * This class is not itself a {@link XPathFactory}, so it inherits none of the static JAXP factory methods. A caller therefore cannot obtain an unsecured + * factory through this class by calling a method such as {@code newDefaultInstance()}. The secure factories are instances of a nested, non-public wrapper + * class. * </p> * * @see org.apache.commons.xml.secure
