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 b382edd Hack for Android builds.
b382edd is described below
commit b382edd15307e2f767966e3b0a8bdd159b9983b1
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Aug 30 12:05:33 2026 -0400
Hack for Android builds.
---
.../org/apache/commons/xml/SecureDocumentBuilderFactoryTest.java | 4 ++--
src/test/java/org/apache/commons/xml/TestConstants.java | 8 +++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git
a/src/test/java/org/apache/commons/xml/SecureDocumentBuilderFactoryTest.java
b/src/test/java/org/apache/commons/xml/SecureDocumentBuilderFactoryTest.java
index 88dace2..39532fd 100644
--- a/src/test/java/org/apache/commons/xml/SecureDocumentBuilderFactoryTest.java
+++ b/src/test/java/org/apache/commons/xml/SecureDocumentBuilderFactoryTest.java
@@ -50,7 +50,7 @@ void forwardsEverySupportedFactoryConfiguration() throws
Exception {
factory.setXIncludeAware(false);
factory.setSchema(null);
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
- factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
+ factory.setAttribute(TestConstants.ACCESS_EXTERNAL_DTD, "");
assertTrue(factory.isCoalescing());
assertFalse(factory.isExpandEntityReferences());
assertTrue(factory.isIgnoringComments());
@@ -60,7 +60,7 @@ void forwardsEverySupportedFactoryConfiguration() throws
Exception {
assertFalse(factory.isXIncludeAware());
assertNull(factory.getSchema());
assertTrue(factory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING));
- assertNotNull(factory.getAttribute(XMLConstants.ACCESS_EXTERNAL_DTD));
+ assertNotNull(factory.getAttribute(TestConstants.ACCESS_EXTERNAL_DTD));
assertNotNull(factory.newDocumentBuilder());
}
diff --git a/src/test/java/org/apache/commons/xml/TestConstants.java
b/src/test/java/org/apache/commons/xml/TestConstants.java
index a77f4ff..26738bd 100644
--- a/src/test/java/org/apache/commons/xml/TestConstants.java
+++ b/src/test/java/org/apache/commons/xml/TestConstants.java
@@ -25,5 +25,11 @@ class TestConstants {
* See TestConstants.ACCESS_EXTERNAL_SCHEMA
*/
static final String ACCESS_EXTERNAL_SCHEMA =
"http://javax.xml.XMLConstants/property/accessExternalSchema";
-
+
+ /**
+ * Hack for Android builds.
+ *
+ * See TestConstants.ACCESS_EXTERNAL_DTD
+ */
+ static final String ACCESS_EXTERNAL_DTD =
"http://javax.xml.XMLConstants/property/accessExternalDTD";
}