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 dd2aa62 Normalize spelling.
dd2aa62 is described below
commit dd2aa6286ee8b053a2e44eb9a99bb18d5e48e421
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jun 27 19:06:59 2026 +0000
Normalize spelling.
---
.../java/org/apache/commons/xml/AndroidProvider.java | 8 ++++----
.../apache/commons/xml/DocumentBuilderHardener.java | 2 +-
src/main/java/org/apache/commons/xml/Limits.java | 18 +++++++++---------
src/main/java/org/apache/commons/xml/XmlFactories.java | 12 ++++++------
.../commons/xml/UnsupportedXmlImplementationTest.java | 4 ++--
5 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/src/main/java/org/apache/commons/xml/AndroidProvider.java
b/src/main/java/org/apache/commons/xml/AndroidProvider.java
index e32f1ee..8bdf20c 100644
--- a/src/main/java/org/apache/commons/xml/AndroidProvider.java
+++ b/src/main/java/org/apache/commons/xml/AndroidProvider.java
@@ -50,7 +50,7 @@
* {@code external-general-entities} and {@code
external-parameter-entities}. The last three are read-only and cannot be
enabled.
* Setting both {@code namespaces} and {@code namespace-prefixes}
triggers an automatic exception at parse time.</li>
* <li>SAX properties: only {@code lexical-handler}.</li>
- * <li>{@link XMLConstants#FEATURE_SECURE_PROCESSING} and JAXP 1.5 {@code
ACCESS_EXTERNAL_*} are not recognised.</li>
+ * <li>{@link XMLConstants#FEATURE_SECURE_PROCESSING} and JAXP 1.5 {@code
ACCESS_EXTERNAL_*} are not recognized.</li>
* <li>Entity expansion: native libexpat enforces a built-in Billion
Laughs check (compiled-in activation threshold and amplification factor), so
internal
* entity expansion is already bounded below us.</li>
* <li>Every external fetch (DTD subset, DOCTYPE {@code SYSTEM},
general/parameter entity) flows through the 2-arg {@link
EntityResolver#resolveEntity}.
@@ -59,9 +59,9 @@
*
* <p>What the DOM/KXmlParser surface exposes:</p>
* <ul>
- * <li>{@link DocumentBuilderFactory#setFeature} only recognises {@code
namespaces} and {@code validation}.</li>
+ * <li>{@link DocumentBuilderFactory#setFeature} only recognizes {@code
namespaces} and {@code validation}.</li>
* <li>{@link DocumentBuilderFactory#setAttribute} always throws {@code
IllegalArgumentException}.</li>
- * <li>{@link XMLConstants#FEATURE_SECURE_PROCESSING} and JAXP 1.5 {@code
ACCESS_EXTERNAL_*} are not recognised.</li>
+ * <li>{@link XMLConstants#FEATURE_SECURE_PROCESSING} and JAXP 1.5 {@code
ACCESS_EXTERNAL_*} are not recognized.</li>
* <li>Entity expansion: KXmlParser does not support user-defined entities
and they are silently dropped.</li>
* </ul>
*
@@ -185,7 +185,7 @@ static XMLReader configure(final XMLReader reader) {
try {
reader.setProperty(LEXICAL_HANDLER_PROPERTY, resolver);
} catch (final SAXException ignore) {
- // ExpatReader recognises the lexical-handler property; if a
future replacement does not, fall through and lose subset-vs-entity
discrimination.
+ // ExpatReader recognizes the lexical-handler property; if a
future replacement does not, fall through and lose subset-vs-entity
discrimination.
}
return new GuardedXMLReader(reader);
}
diff --git a/src/main/java/org/apache/commons/xml/DocumentBuilderHardener.java
b/src/main/java/org/apache/commons/xml/DocumentBuilderHardener.java
index 218e771..32581d8 100644
--- a/src/main/java/org/apache/commons/xml/DocumentBuilderHardener.java
+++ b/src/main/java/org/apache/commons/xml/DocumentBuilderHardener.java
@@ -33,7 +33,7 @@
*
* <p>Rather than branching on the implementation class, {@link
#harden(DocumentBuilderFactory)} probes what the factory supports and
adapts:</p>
* <ul>
- * <li><strong>Android</strong> (Harmony / KXmlParser): recognised by
class name and left untouched. It exposes no {@link
XMLConstants#FEATURE_SECURE_PROCESSING
+ * <li><strong>Android</strong> (Harmony / KXmlParser): recognized by
class name and left untouched. It exposes no {@link
XMLConstants#FEATURE_SECURE_PROCESSING
* FSP}, no JAXP 1.5 {@code ACCESS_EXTERNAL_*} and no attribute API at
all, while KXmlParser silently drops user-defined entities, so there is nothing
to
* apply.</li>
* <li><strong>FSP</strong>: required. It switches on the implementation's
built-in security manager, which is what carries the processing limits.</li>
diff --git a/src/main/java/org/apache/commons/xml/Limits.java
b/src/main/java/org/apache/commons/xml/Limits.java
index 03ff250..d60c655 100644
--- a/src/main/java/org/apache/commons/xml/Limits.java
+++ b/src/main/java/org/apache/commons/xml/Limits.java
@@ -138,35 +138,35 @@ final class Limits {
*/
private static final Map<String, IntSupplier> JDK_LIMITS;
/**
- * URL form of the JDK's per-element attribute limit; recognised across
JDK 8 through 25.
+ * URL form of the JDK's per-element attribute limit; recognized across
JDK 8 through 25.
*/
private static final String JDK_URL_ELEMENT_ATTRIBUTE_LIMIT =
"http://www.oracle.com/xml/jaxp/properties/elementAttributeLimit";
/**
- * URL form of the JDK's entity-expansion limit; recognised across JDK 8
through 25. The short form {@code jdk.xml.entityExpansionLimit} is JDK 11+ only.
+ * URL form of the JDK's entity-expansion limit; recognized across JDK 8
through 25. The short form {@code jdk.xml.entityExpansionLimit} is JDK 11+ only.
*/
private static final String JDK_URL_ENTITY_EXPANSION_LIMIT =
"http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit";
/**
- * URL form of the JDK's cumulative entity-replacement limit; recognised
across JDK 8 through 25.
+ * URL form of the JDK's cumulative entity-replacement limit; recognized
across JDK 8 through 25.
*/
private static final String JDK_URL_ENTITY_REPLACEMENT_LIMIT =
"http://www.oracle.com/xml/jaxp/properties/entityReplacementLimit";
/**
- * URL form of the JDK's per-general-entity size limit; recognised across
JDK 8 through 25.
+ * URL form of the JDK's per-general-entity size limit; recognized across
JDK 8 through 25.
*/
private static final String JDK_URL_GENERAL_ENTITY_SIZE_LIMIT =
"http://www.oracle.com/xml/jaxp/properties/maxGeneralEntitySizeLimit";
/**
- * URL form of the JDK's maximum element depth; recognised across JDK 8
through 25.
+ * URL form of the JDK's maximum element depth; recognized across JDK 8
through 25.
*/
private static final String JDK_URL_MAX_ELEMENT_DEPTH =
"http://www.oracle.com/xml/jaxp/properties/maxElementDepth";
/**
- * URL form of the JDK's maximum XML name length; recognised across JDK 8
through 25.
+ * URL form of the JDK's maximum XML name length; recognized across JDK 8
through 25.
*/
private static final String JDK_URL_MAX_NAME_LIMIT =
"http://www.oracle.com/xml/jaxp/properties/maxXMLNameLimit";
/**
- * URL form of the JDK's per-parameter-entity size limit; recognised
across JDK 8 through 25.
+ * URL form of the JDK's per-parameter-entity size limit; recognized
across JDK 8 through 25.
*/
private static final String JDK_URL_PARAMETER_ENTITY_SIZE_LIMIT =
"http://www.oracle.com/xml/jaxp/properties/maxParameterEntitySizeLimit";
/**
- * URL form of the JDK's total entity-size limit; recognised across JDK 8
through 25.
+ * URL form of the JDK's total entity-size limit; recognized across JDK 8
through 25.
*/
private static final String JDK_URL_TOTAL_ENTITY_SIZE_LIMIT =
"http://www.oracle.com/xml/jaxp/properties/totalEntitySizeLimit";
/**
@@ -251,7 +251,7 @@ static void tryApply(final DocumentBuilderFactory factory) {
setAttribute(factory,
XercesProvider.XERCES_SECURITY_MANAGER_PROPERTY, securityManager);
return;
}
- // Pin the JDK attribute limits to JDK 25 secure values; skip silently
any attribute the implementation does not recognise.
+ // Pin the JDK attribute limits to JDK 25 secure values; skip silently
any attribute the implementation does not recognize.
JDK_LIMITS.forEach((name, supplier) -> setOptionalAttribute(factory,
name, Integer.toString(supplier.getAsInt())));
}
diff --git a/src/main/java/org/apache/commons/xml/XmlFactories.java
b/src/main/java/org/apache/commons/xml/XmlFactories.java
index 6228256..e7a7953 100644
--- a/src/main/java/org/apache/commons/xml/XmlFactories.java
+++ b/src/main/java/org/apache/commons/xml/XmlFactories.java
@@ -164,7 +164,7 @@ public static Source harden(final Source source) throws
TransformerConfiguration
*
* @param reader the reader to harden; never {@code null}.
* @return a hardened reader.
- * @throws IllegalStateException if the reader's concrete class is not
recognised by any bundled hardening recipe, or if the matching recipe cannot
apply
+ * @throws IllegalStateException if the reader's concrete class is not
recognized by any bundled hardening recipe, or if the matching recipe cannot
apply
* its settings to it.
*/
public static XMLReader harden(final XMLReader reader) {
@@ -203,7 +203,7 @@ public static DocumentBuilderFactory
newDocumentBuilderFactory() {
* an {@code xi:include} element fails.</p>
*
* @return a hardened factory.
- * @throws IllegalStateException if the underlying JAXP implementation is
not recognised by any bundled hardening recipe, or if the matching recipe cannot
+ * @throws IllegalStateException if the underlying JAXP implementation is
not recognized by any bundled hardening recipe, or if the matching recipe cannot
* apply its settings to it.
*/
public static SAXParserFactory newSAXParserFactory() {
@@ -224,7 +224,7 @@ public static SAXParserFactory newSAXParserFactory() {
* resulting {@link javax.xml.validation.Schema}.</p>
*
* @return a hardened factory.
- * @throws IllegalStateException if the underlying Schema implementation
is not recognised by any bundled hardening recipe, or if the matching recipe
+ * @throws IllegalStateException if the underlying Schema implementation
is not recognized by any bundled hardening recipe, or if the matching recipe
* cannot apply its settings to it.
*/
public static SchemaFactory newSchemaFactory() {
@@ -241,7 +241,7 @@ public static SchemaFactory newSchemaFactory() {
* {@code Transformer.transform(Source, Result)} time.</p>
*
* @return a hardened factory.
- * @throws IllegalStateException if the underlying TrAX implementation is
not recognised by any bundled hardening recipe, or if the matching recipe cannot
+ * @throws IllegalStateException if the underlying TrAX implementation is
not recognized by any bundled hardening recipe, or if the matching recipe cannot
* apply its settings to it.
*/
public static TransformerFactory newTransformerFactory() {
@@ -254,7 +254,7 @@ public static TransformerFactory newTransformerFactory() {
* <p>The three universal guarantees on {@link XmlFactories} apply; StAX
exposes no additional vectors beyond them.</p>
*
* @return a hardened factory.
- * @throws IllegalStateException if the underlying StAX implementation is
not recognised by any bundled hardening recipe, or if the matching recipe cannot
+ * @throws IllegalStateException if the underlying StAX implementation is
not recognized by any bundled hardening recipe, or if the matching recipe cannot
* apply its settings to it.
*/
public static XMLInputFactory newXMLInputFactory() {
@@ -268,7 +268,7 @@ public static XMLInputFactory newXMLInputFactory() {
* {@code unparsed-text()}) are not resolved.</p>
*
* @return a hardened factory.
- * @throws IllegalStateException if the underlying XPath implementation is
not recognised by any bundled hardening recipe, or if the matching recipe cannot
+ * @throws IllegalStateException if the underlying XPath implementation is
not recognized by any bundled hardening recipe, or if the matching recipe cannot
* apply its settings to it.
*/
public static XPathFactory newXPathFactory() {
diff --git
a/src/test/java/org/apache/commons/xml/UnsupportedXmlImplementationTest.java
b/src/test/java/org/apache/commons/xml/UnsupportedXmlImplementationTest.java
index 863fdf4..ff8d80a 100644
--- a/src/test/java/org/apache/commons/xml/UnsupportedXmlImplementationTest.java
+++ b/src/test/java/org/apache/commons/xml/UnsupportedXmlImplementationTest.java
@@ -34,7 +34,7 @@
class UnsupportedXmlImplementationTest {
/**
- * A stand-in factory that rejects the secure-processing feature, like a
JAXP implementation that does not recognise it.
+ * A stand-in factory that rejects the secure-processing feature, like a
JAXP implementation that does not recognize it.
*/
public static final class FakeDocumentBuilderFactory extends
DocumentBuilderFactory {
@@ -55,7 +55,7 @@ public Object getAttribute(final String name) {
@Override
public void setFeature(final String name, final boolean value) throws
ParserConfigurationException {
- throw new ParserConfigurationException("feature not recognised: "
+ name);
+ throw new ParserConfigurationException("feature not recognized: "
+ name);
}
@Override