On Thu, 14 Jul 2022 01:25:38 GMT, Joe Wang <[email protected]> wrote:
>> Bill Huang has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains three additional
>> commits since the last revision:
>>
>> - Merge branch 'openjdk:master' into JDK-8289511
>> - Added more XPath expression test cases and created negative tests for
>> invalid expressions.
>> - Created XPathChildTest.java
>
> test/jaxp/javax/xml/jaxp/unittest/xpath/XPathChildTest.java line 156:
>
>> 154: public Object[][] getInvalidExp() {
>> 155: return new Object[][]{
>> 156: // NullPointerException
>
> These NPE tests need to be revisited. First of all, by the spec, NPE shall
> throw only "If expression or returnType is null" (and that's already covered
> in the Exception test). Secondly, these NPEs were not thrown by the eval
> process, it was merely because the NodeList was empty or Node was null. The
> expressions themselves were not "invalid".
Agreed. These expressions are not invalid and they are more on a focus of zero
children rather than NPE. I can move them to a different test case.
-------------
PR: https://git.openjdk.org/jdk/pull/9484