On Wed, 19 Feb 2025 20:04:33 GMT, Joe Wang <jo...@openjdk.org> wrote:
> The schema file is integral to the test, so we assume it will be present. A > minor improvement would be to remove the conditional check that verifies its > existence. This would allow the test to fail if it can't load the schema file. Do you mean we should change like below diff --git a/test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.java b/test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.java index 077415e3095..fbb515aca70 100644 --- a/test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.java +++ b/test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.java @@ -59,13 +59,9 @@ public final void testReusingDocumentBuilder() { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); docBuilderFactory.setNamespaceAware(true); - if (xsd != null) { - docBuilderFactory.setValidating(true); - docBuilderFactory.setAttribute(SCHEMA_LANGUAGE_URL, XML_SCHEMA_URL); - docBuilderFactory.setAttribute(SCHEMA_SOURCE_URL, xsd); - } + docBuilderFactory.setValidating(true); + docBuilderFactory.setAttribute(SCHEMA_LANGUAGE_URL, XML_SCHEMA_URL); + docBuilderFactory.setAttribute(SCHEMA_SOURCE_URL, xsd); ------------- PR Comment: https://git.openjdk.org/jdk/pull/23627#issuecomment-2670405905