This is an automated email from the ASF dual-hosted git repository.
ppkarwasz 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 ffc7b82 Fix Android build
ffc7b82 is described below
commit ffc7b82b10779a58f818a4de35c81ef07d9b39ba
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Sat Aug 29 15:12:21 2026 +0200
Fix Android build
Android's javax.xml.XMLConstants predates JAXP 1.5 and lacks
ACCESS_EXTERNAL_DTD; SecureValidatorHandlerTest also compiles in
android-tests, so spell out the property URI instead.
Assisted-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RZSVucNBf5fsyd1uqamLuk
---
src/test/java/org/apache/commons/xml/SecureValidatorHandlerTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/src/test/java/org/apache/commons/xml/SecureValidatorHandlerTest.java
b/src/test/java/org/apache/commons/xml/SecureValidatorHandlerTest.java
index 6c3a03c..f0c8817 100644
--- a/src/test/java/org/apache/commons/xml/SecureValidatorHandlerTest.java
+++ b/src/test/java/org/apache/commons/xml/SecureValidatorHandlerTest.java
@@ -331,7 +331,8 @@ void delegatesProperty() throws Exception {
final ValidatorHandler delegate = newValidatorHandler();
final SecureValidatorHandler handler = new
SecureValidatorHandler(delegate);
// Verify delegation of getProperty; setProperty may be unsupported on
this implementation
- final String property = XMLConstants.ACCESS_EXTERNAL_DTD;
+ // Spelled out because Android's XMLConstants predates JAXP 1.5 and
lacks ACCESS_EXTERNAL_DTD; this file also compiles in android-tests.
+ final String property =
"http://javax.xml.XMLConstants/property/accessExternalDTD";
final Object delegateValue;
try {
delegateValue = delegate.getProperty(property);