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 c5b04f04e86c3c94e72e865827efc313035313e3
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Aug 26 07:25:30 2026 -0400

    Normalize the term for a new object from "freah" to "new".
---
 AGENTS.md                                                  |  2 +-
 .../org/apache/commons/xml/FallbackIgnoreURIResolver.java  |  2 +-
 .../java/org/apache/commons/xml/HardeningSAXParser.java    |  2 +-
 .../apache/commons/xml/HardeningTransformerFactory.java    |  2 +-
 .../java/org/apache/commons/xml/HardeningXMLFilter.java    |  2 +-
 .../org/apache/commons/xml/HardeningXMLInputFactory.java   |  2 +-
 .../java/org/apache/commons/xml/SAXParserHardener.java     |  2 +-
 src/main/java/org/apache/commons/xml/XmlFactories.java     | 14 +++++++-------
 src/site/markdown/index.md                                 |  4 ++--
 src/site/markdown/threat_model.md                          |  2 +-
 src/test/java/org/apache/commons/xml/XmlFactoriesTest.java |  2 +-
 11 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/AGENTS.md b/AGENTS.md
index 9b78cd5..73692e9 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -47,7 +47,7 @@ Guidance for AI coding agents working in this repository.
 ### Prose
 
 - No em-dashes (`—`) in Javadoc, comments, commit messages, or documentation.
-  Use commas, colons, parentheses, or a fresh sentence instead. This applies to
+  Use commas, colons, parentheses, or a new sentence instead. This applies to
   HTML entities too (`&mdash;`).
 
 ### Commits
diff --git 
a/src/main/java/org/apache/commons/xml/FallbackIgnoreURIResolver.java 
b/src/main/java/org/apache/commons/xml/FallbackIgnoreURIResolver.java
index a462872..31da5dc 100644
--- a/src/main/java/org/apache/commons/xml/FallbackIgnoreURIResolver.java
+++ b/src/main/java/org/apache/commons/xml/FallbackIgnoreURIResolver.java
@@ -62,7 +62,7 @@ private static Document newEmptyDocument() {
 
     private URIResolver delegate;
 
-    /** Produces the empty {@link Source} returned for an unresolved 
reference; a fresh value per call keeps callers from mutating a shared Source. 
*/
+    /** Produces the empty {@link Source} returned for an unresolved 
reference; a new value per call keeps callers from mutating a shared Source. */
     private final Supplier<Source> emptySource;
 
     FallbackIgnoreURIResolver(final URIResolver delegate) {
diff --git a/src/main/java/org/apache/commons/xml/HardeningSAXParser.java 
b/src/main/java/org/apache/commons/xml/HardeningSAXParser.java
index 5e176b7..e37f3d6 100644
--- a/src/main/java/org/apache/commons/xml/HardeningSAXParser.java
+++ b/src/main/java/org/apache/commons/xml/HardeningSAXParser.java
@@ -34,7 +34,7 @@
  * SAX 1 ({@link #getParser()}) path gets the same hardening. The SAX 1 view 
matters because some consumers, such as Xalan's identity transformer, still ask
  * for a {@link Parser}.</p>
  *
- * <p>The hardened reader is computed lazily on first access and cached: 
hardening an {@link XMLReader} can install a fresh wrapper (Android's Expat 
path), so
+ * <p>The hardened reader is computed lazily on first access and cached: 
hardening an {@link XMLReader} can install a new wrapper (Android's Expat 
path), so
  * every parse must run through the same instance. The {@code parse(...)} 
overloads inherited from {@link SAXParser} dispatch virtually to {@link 
#getXMLReader()}
  * and {@link #getParser()}, so they too run through the hardened views 
without further overrides.</p>
  */
diff --git 
a/src/main/java/org/apache/commons/xml/HardeningTransformerFactory.java 
b/src/main/java/org/apache/commons/xml/HardeningTransformerFactory.java
index 84775d4..5b8ef0f 100644
--- a/src/main/java/org/apache/commons/xml/HardeningTransformerFactory.java
+++ b/src/main/java/org/apache/commons/xml/HardeningTransformerFactory.java
@@ -45,7 +45,7 @@
  * {@link javax.xml.transform.TransformerFactory} wrapper that rewrites every 
Source-taking entry point through {@link 
SAXParserHardener#hardenSource(Source)} before
  * delegating.
  *
- * <p>Used by providers whose underlying TrAX implementation pulls a fresh 
{@code SAXParserFactory.newInstance()} for any Source that is not already a
+ * <p>Used by providers whose underlying TrAX implementation pulls a new 
{@code SAXParserFactory.newInstance()} for any Source that is not already a
  * {@link SAXSource} carrying its own {@link XMLReader}, and only sets {@link 
javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING FSP} on the resulting reader.
  * Wrapping the factory and rewriting the Source upstream guarantees the parse 
runs through an {@link XmlFactories}-hardened reader instead.</p>
  *
diff --git a/src/main/java/org/apache/commons/xml/HardeningXMLFilter.java 
b/src/main/java/org/apache/commons/xml/HardeningXMLFilter.java
index 6b99312..eac2f13 100644
--- a/src/main/java/org/apache/commons/xml/HardeningXMLFilter.java
+++ b/src/main/java/org/apache/commons/xml/HardeningXMLFilter.java
@@ -66,7 +66,7 @@ public void parse(final InputSource input) throws 
SAXException, IOException {
             result.setLexicalHandler((LexicalHandler) handler);
         }
         try {
-            // A fresh HardeningTransformer per parse: the floor is installed 
on it, and transformers are not reusable across concurrent parses.
+            // A new HardeningTransformer per parse: the floor is installed on 
it, and transformers are not reusable across concurrent parses.
             final Transformer transformer = templates.newTransformer();
             transformer.transform(new SAXSource(getParent(), input), result);
         } catch (final TransformerException e) {
diff --git a/src/main/java/org/apache/commons/xml/HardeningXMLInputFactory.java 
b/src/main/java/org/apache/commons/xml/HardeningXMLInputFactory.java
index a806018..05ffbd7 100644
--- a/src/main/java/org/apache/commons/xml/HardeningXMLInputFactory.java
+++ b/src/main/java/org/apache/commons/xml/HardeningXMLInputFactory.java
@@ -45,7 +45,7 @@
  * {@code com.ctc.wstx.*Resolver} keys) is routed uniformly: a caller who 
supplies their own {@link FallbackIgnoreXMLResolver} takes control and it is
  * passed straight to the delegate; otherwise the current resolver on that 
hook is read, and if it is one of our floors the caller's resolver is set as its
  * {@link FallbackIgnoreXMLResolver#setDelegate delegate} (an opt-in the floor 
cannot be removed by), or, if the hook is empty, the caller's resolver is
- * wrapped in a fresh floor. This matters because Woodstox does not chain 
resolvers: when a resolver returns {@code null}, {@code DefaultInputResolver} 
falls
+ * wrapped in a new floor. This matters because Woodstox does not chain 
resolvers: when a resolver returns {@code null}, {@code DefaultInputResolver} 
falls
  * through to fetching the systemId URL itself, so a caller-set resolver that 
returns {@code null} must still land behind the floor. {@link 
#getXMLResolver()} and
  * {@code getProperty} report the caller's resolver unwrapped.</p>
  */
diff --git a/src/main/java/org/apache/commons/xml/SAXParserHardener.java 
b/src/main/java/org/apache/commons/xml/SAXParserHardener.java
index 978b809..08f874b 100644
--- a/src/main/java/org/apache/commons/xml/SAXParserHardener.java
+++ b/src/main/java/org/apache/commons/xml/SAXParserHardener.java
@@ -139,7 +139,7 @@ static Source hardenSource(final Source source) throws 
TransformerConfigurationE
     }
 
     /**
-     * Creates a fresh hardened, namespace-aware {@link XMLReader} for the 
TrAX wrappers to parse sources with.
+     * Creates a new hardened, namespace-aware {@link XMLReader} for the TrAX 
wrappers to parse sources with.
      *
      * @return a hardened reader.
      * @throws TransformerConfigurationException if a hardened reader cannot 
be obtained.
diff --git a/src/main/java/org/apache/commons/xml/XmlFactories.java 
b/src/main/java/org/apache/commons/xml/XmlFactories.java
index a94d5df..65b69ac 100644
--- a/src/main/java/org/apache/commons/xml/XmlFactories.java
+++ b/src/main/java/org/apache/commons/xml/XmlFactories.java
@@ -28,7 +28,7 @@
 /**
  * Entry point for obtaining hardened JAXP factories.
  *
- * <p>Every method on this class returns a <em>fresh, hardened</em> factory 
instance. No caching or pooling is performed; callers on a hot path are 
responsible
+ * <p>Every method on this class returns a <em>new, hardened</em> factory 
instance. No caching or pooling is performed; callers on a hot path are 
responsible
  * for their own caching.</p>
  *
  * <h2>Hardening guarantees</h2>
@@ -81,7 +81,7 @@ public final class XmlFactories {
     static final String THROW_ON_UNRESOLVED = 
"org.apache.commons.xml.throwOnUnresolved";
 
     /**
-     * Returns a fresh, hardened {@link DocumentBuilderFactory}.
+     * Returns a new, hardened {@link DocumentBuilderFactory}.
      *
      * <p>Beyond the three universal guarantees on {@link XmlFactories}, 
XInclude resolution is denied by default.
      * When {@link DocumentBuilderFactory#setXIncludeAware(boolean) 
setXIncludeAware(true)} is called on the returned
@@ -97,7 +97,7 @@ public static DocumentBuilderFactory 
newDocumentBuilderFactory() {
     }
 
     /**
-     * Returns a fresh, hardened {@link SAXParserFactory}.
+     * Returns a new, hardened {@link SAXParserFactory}.
      *
      * <p>Beyond the three universal guarantees on {@link XmlFactories}, 
XInclude resolution is denied by default.
      * When {@link SAXParserFactory#setXIncludeAware(boolean) 
setXIncludeAware(true)} is called on the returned
@@ -114,7 +114,7 @@ public static SAXParserFactory newSAXParserFactory() {
     }
 
     /**
-     * Returns a fresh, hardened {@link SchemaFactory} for the given schema 
language.
+     * Returns a new, hardened {@link SchemaFactory} for the given schema 
language.
      *
      * <p>Beyond the three universal guarantees on {@link XmlFactories}:</p>
      *
@@ -136,7 +136,7 @@ public static SchemaFactory newSchemaFactory(final String 
schemaLanguage) {
     }
 
     /**
-     * Returns a fresh, hardened {@link TransformerFactory}.
+     * Returns a new, hardened {@link TransformerFactory}.
      *
      * <p>Beyond the three universal guarantees on {@link XmlFactories}: 
{@code xsl:import}, {@code xsl:include} and {@code document()} URIs are not
      * resolved.</p>
@@ -161,7 +161,7 @@ public static TransformerFactory newTransformerFactory() {
     }
 
     /**
-     * Returns a fresh, hardened {@link XMLInputFactory}.
+     * Returns a new, hardened {@link XMLInputFactory}.
      *
      * <p>The three universal guarantees on {@link XmlFactories} apply; StAX 
exposes no additional vectors beyond them.</p>
      *
@@ -173,7 +173,7 @@ public static XMLInputFactory newXMLInputFactory() {
     }
 
     /**
-     * Returns a fresh, hardened {@link XPathFactory} for the default XPath 
object model.
+     * Returns a new, hardened {@link XPathFactory} for the default XPath 
object model.
      *
      * <p>Beyond the three universal guarantees on {@link XmlFactories}, 
URI-fetching XPath 3.1+ functions ({@code doc()}, {@code collection()},
      * {@code unparsed-text()}) are not resolved.</p>
diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md
index ac85fef..0a88d1b 100644
--- a/src/site/markdown/index.md
+++ b/src/site/markdown/index.md
@@ -40,7 +40,7 @@ such as standalone Xerces, Woodstox, or Saxon's TrAX, need 
further configuration
 library author has no control over which implementation is on the classpath at 
runtime, so the effective security
 posture of their code depends on a deployment decision made elsewhere.
 
-This library provides that baseline. Each `XmlFactories` call returns a fresh 
factory hardened by an
+This library provides that baseline. Each `XmlFactories` call returns a new 
factory hardened by an
 implementation-specific recipe, so the returned object behaves the same way 
security-wise regardless of which JAXP
 implementation resolved. Security becomes a property of the call, not of the 
classpath, and there is one place to
 update when a new hardening setting becomes available or a default changes.
@@ -57,7 +57,7 @@ Add the library to your build:
 </dependency>
 ```
 
-Every method on `XmlFactories` returns a fresh, hardened factory.
+Every method on `XmlFactories` returns a new, hardened factory.
 Pick the one that matches the API you already use;
 no other configuration is required.
 On hardened factories an external resource reference (DTD, entity, schema, 
stylesheet) is never fetched:
diff --git a/src/site/markdown/threat_model.md 
b/src/site/markdown/threat_model.md
index 562c533..1a688c1 100644
--- a/src/site/markdown/threat_model.md
+++ b/src/site/markdown/threat_model.md
@@ -41,7 +41,7 @@ a finding that falls under [What is out of 
scope](#what-is-out-of-scope) will be
 ### Scope and intended use
 
 This library is a helper for **safely creating JAXP factories**. Each 
`XmlFactories.newXxxFactory()` method returns a
-fresh, hardened factory whose parsers reject the common XML attacks (external 
entity / DTD resolution, XXE, SSRF through
+new, hardened factory whose parsers reject the common XML attacks (external 
entity / DTD resolution, XXE, SSRF through
 external references, and entity-expansion denial of service such as Billion 
Laughs). The exact guarantee each factory
 makes is documented in the Javadoc:
 
diff --git a/src/test/java/org/apache/commons/xml/XmlFactoriesTest.java 
b/src/test/java/org/apache/commons/xml/XmlFactoriesTest.java
index 8a016b9..e61d64b 100644
--- a/src/test/java/org/apache/commons/xml/XmlFactoriesTest.java
+++ b/src/test/java/org/apache/commons/xml/XmlFactoriesTest.java
@@ -40,7 +40,7 @@
 /**
  * Public-API smoke tests for {@link XmlFactories}.
  *
- * <p>Attack tests live in the {@code attacks} sub-package; this file only 
verifies that fresh factories are returned, that they report safe defaults, and 
that
+ * <p>Attack tests live in the {@code attacks} sub-package; this file only 
verifies that new factories are returned, that they report safe defaults, and 
that
  * a benign document still parses successfully.</p>
  */
 class XmlFactoriesTest {

Reply via email to