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 961e48f  Hack for Android builds.
961e48f is described below

commit 961e48fb1411c40988928d25724d2108505020b5
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Aug 30 12:00:49 2026 -0400

    Hack for Android builds.
---
 .../commons/xml/SecureSchemaFactoryTest.java       |  2 +-
 .../apache/commons/xml/SecureValidatorTest.java    |  4 +--
 .../java/org/apache/commons/xml/TestConstants.java | 29 ++++++++++++++++++++++
 3 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/src/test/java/org/apache/commons/xml/SecureSchemaFactoryTest.java 
b/src/test/java/org/apache/commons/xml/SecureSchemaFactoryTest.java
index e1ebc2d..7af8921 100644
--- a/src/test/java/org/apache/commons/xml/SecureSchemaFactoryTest.java
+++ b/src/test/java/org/apache/commons/xml/SecureSchemaFactoryTest.java
@@ -111,7 +111,7 @@ void forwardsSchemaFactoryConfigurationAndAccessors() 
throws Exception {
         factory.setErrorHandler(errorHandler);
         factory.setResourceResolver(resolver);
         factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-        factory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
+        factory.setProperty(TestConstants.ACCESS_EXTERNAL_SCHEMA, "");
         assertSame(errorHandler, factory.getErrorHandler());
         assertSame(resolver, factory.getResourceResolver());
         
assertTrue(factory.isSchemaLanguageSupported(XMLConstants.W3C_XML_SCHEMA_NS_URI));
diff --git a/src/test/java/org/apache/commons/xml/SecureValidatorTest.java 
b/src/test/java/org/apache/commons/xml/SecureValidatorTest.java
index 4003d2f..3da6071 100644
--- a/src/test/java/org/apache/commons/xml/SecureValidatorTest.java
+++ b/src/test/java/org/apache/commons/xml/SecureValidatorTest.java
@@ -116,10 +116,10 @@ void 
preservesNonRemovableResolverFloorAndForwardsConfiguration() throws Excepti
         assertNull(validator.getResourceResolver());
         validator.setResourceResolver(resolver);
         validator.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-        validator.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
+        validator.setProperty(TestConstants.ACCESS_EXTERNAL_SCHEMA, "");
         assertSame(resolver, validator.getResourceResolver());
         
assertTrue(validator.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING));
-        assertThrows(SAXNotRecognizedException.class, () -> 
validator.getProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA));
+        assertThrows(SAXNotRecognizedException.class, () -> 
validator.getProperty(TestConstants.ACCESS_EXTERNAL_SCHEMA));
         validator.reset();
         assertNull(validator.getResourceResolver());
     }
diff --git a/src/test/java/org/apache/commons/xml/TestConstants.java 
b/src/test/java/org/apache/commons/xml/TestConstants.java
new file mode 100644
index 0000000..a77f4ff
--- /dev/null
+++ b/src/test/java/org/apache/commons/xml/TestConstants.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.xml;
+
+class TestConstants {
+
+    /**
+     * Hack for Android builds.
+     *
+     * See TestConstants.ACCESS_EXTERNAL_SCHEMA
+     */
+    static final String ACCESS_EXTERNAL_SCHEMA = 
"http://javax.xml.XMLConstants/property/accessExternalSchema";;
+    
+}

Reply via email to