RFR: 8284920: Incorrect Token type causes XPath expression to return incorrect results [v2]
Naoto Sato
naoto at openjdk.java.net
Wed Apr 20 18:33:27 UTC 2022
On Wed, 20 Apr 2022 18:28:19 GMT, Joe Wang <joehw at openjdk.org> wrote:
>> Patch note:
>>
>> The previous patch changed all literal tokens to use constants. However, replacing "." with Token.DOT introduced this bug.
>> While tokens with a single char are inherently of type char, due to the different implementation of the overloaded method "tokenIs" that takes String or char, a wrong input type will produce incorrect result. It may be worth it to take a closer look at the overloaded method, but for now, a quick fix is to reverse the input type back to String (DOT_STR).
>>
>> Test: the issue affect the processing of the short form of the parent axis "..". The test verifies that all form of the parent axis shall return the same result.
>>
>> Test: all XML tests passed.
>
> Joe Wang has updated the pull request incrementally with one additional commit since the last revision:
>
> add test cases for the self axis
Marked as reviewed by naoto (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/8321
More information about the core-libs-dev
mailing list