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 e8f0b88  Fix AI slop
e8f0b88 is described below

commit e8f0b88b134f05a9a48fa2c2e41e7648095df424
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Aug 29 06:32:05 2026 -0400

    Fix AI slop
    
    - In org.apache.commons.xml.SecureTransformer.transform(Source, Result),
    a TransformerConfigurationException is already an instance of
    TransformerException, no need to wrap it.
    - Javadoc
---
 src/main/java/org/apache/commons/xml/SecureTransformer.java | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/apache/commons/xml/SecureTransformer.java 
b/src/main/java/org/apache/commons/xml/SecureTransformer.java
index 112b6ad..bfcdeaa 100644
--- a/src/main/java/org/apache/commons/xml/SecureTransformer.java
+++ b/src/main/java/org/apache/commons/xml/SecureTransformer.java
@@ -139,15 +139,12 @@ public void setURIResolver(final URIResolver resolver) {
     /**
      * {@inheritDoc}
      *
-     * @throws FactoryConfigurationError Thrown from a factory in case of a 
{@link java.util.ServiceConfigurationError service
-     *                                   configuration error} or if the 
implementation is not available or cannot be instantiated.
+     * @throws TransformerConfigurationException Thrown if a secure reader 
cannot be obtained.
+     * @throws FactoryConfigurationError         Thrown from a factory in case 
of a {@link java.util.ServiceConfigurationError service configuration error} or
+     *                                           if the implementation is not 
available or cannot be instantiated.
      */
     @Override
     public void transform(final Source xmlSource, final Result outputTarget) 
throws TransformerException {
-        try {
-            delegate.transform(SecureSAXParserFactory.secure(xmlSource, 
overrideDefaultParser), outputTarget);
-        } catch (final TransformerConfigurationException e) {
-            throw new TransformerException(e);
-        }
+        delegate.transform(SecureSAXParserFactory.secure(xmlSource, 
overrideDefaultParser), outputTarget);
     }
 }

Reply via email to