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
The following commit(s) were added to refs/heads/main by this push:
new 24ee658 Add inline comment
24ee658 is described below
commit 24ee6580f3ca467496ae86c589da02d9676dcf85
Author: Gary Gregory <[email protected]>
AuthorDate: Mon Aug 31 07:48:33 2026 -0400
Add inline comment
- SecureTemplates.newTransformer()
- https://issues.apache.org/jira/browse/XALANJ-2410
---
src/main/java/org/apache/commons/xml/secure/SecureTemplates.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main/java/org/apache/commons/xml/secure/SecureTemplates.java
b/src/main/java/org/apache/commons/xml/secure/SecureTemplates.java
index ec813f4..b7362a7 100644
--- a/src/main/java/org/apache/commons/xml/secure/SecureTemplates.java
+++ b/src/main/java/org/apache/commons/xml/secure/SecureTemplates.java
@@ -90,6 +90,8 @@ public Properties getOutputProperties() {
@Override
public Transformer newTransformer() throws
TransformerConfigurationException {
final Transformer transformer = delegate.newTransformer();
+ // Some implementations return null rather than throw, so preserve the
delegate's behavior instead of enforcing the contract.
+ // For example, https://issues.apache.org/jira/browse/XALANJ-2410
return transformer != null ? new SecureTransformer(transformer,
uriResolver, emptySource, overrideDefaultParser) : null;
}
}