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 2d2e37b  Refactor magic string in to a constant.
2d2e37b is described below

commit 2d2e37bef05c0902e7f11f1e87977f4f8f2dda82
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Aug 28 17:11:29 2026 -0400

    Refactor magic string in to a constant.
---
 src/main/java/org/apache/commons/xml/SaxonProvider.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/xml/SaxonProvider.java 
b/src/main/java/org/apache/commons/xml/SaxonProvider.java
index 6195e92..551c079 100644
--- a/src/main/java/org/apache/commons/xml/SaxonProvider.java
+++ b/src/main/java/org/apache/commons/xml/SaxonProvider.java
@@ -89,6 +89,8 @@ private static Supplier<Source> emptySourceSupplier() {
      */
     private static final class SecureConfiguration extends Configuration {
 
+        private static final String JDK_DEFAULT_PARSER = "#DEFAULT";
+
         /** Collection-level ignore: {@code fn:collection()} and {@code 
fn:uri-collection()} resolve to an empty collection instead of fetching. */
         private static final CollectionFinder EMPTY_COLLECTION_FINDER = 
(context, collectionURI) -> {
             if (SecureException.throwOnUnresolved()) {
@@ -104,8 +106,8 @@ private SecureConfiguration() {
             //  fn:collection bypasses the resolver, closed by the empty 
collection finder.
             setCollectionFinder(EMPTY_COLLECTION_FINDER);
             // Use the parser below for both style and source:
-            setStyleParserClass("#DEFAULT");
-            setSourceParserClass("#DEFAULT");
+            setStyleParserClass(JDK_DEFAULT_PARSER);
+            setSourceParserClass(JDK_DEFAULT_PARSER);
         }
 
         /**

Reply via email to