RFR: 8349959: Test CR6740048.java passes unexpectedly missing CR6740048.xsd
Joe Wang
joehw at openjdk.org
Wed Feb 19 20:06:52 UTC 2025
On Fri, 14 Feb 2025 07:44:26 GMT, SendaoYan <syan at openjdk.org> wrote:
> Hi all,
>
> Test test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.java run passes unexpectedly when missing the depentdent file test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.xsd. This PR add a NULL check after call `getResourceAsStream("CR6740048.xsd")`.
>
> This PR do not change the original test logic but make test more robustness. Change has been verified locally, test-fix only, no risk.
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.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23627#issuecomment-2669644429
More information about the core-libs-dev
mailing list