Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8284920: Incorrect Token type causes XPath expression to return incorrect results #8321

Closed
wants to merge 2 commits into from

Conversation

JoeWang-Java
Copy link
Member

@JoeWang-Java JoeWang-Java commented Apr 20, 2022

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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8284920: Incorrect Token type causes XPath expression to return incorrect results ⚠️ Issue is not open.

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8321/head:pull/8321
$ git checkout pull/8321

Update a local copy of the PR:
$ git checkout pull/8321
$ git pull https://git.openjdk.java.net/jdk pull/8321/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8321

View PR using the GUI difftool:
$ git pr show -t 8321

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8321.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 20, 2022

👋 Welcome back joehw! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 20, 2022
@openjdk
Copy link

openjdk bot commented Apr 20, 2022

@JoeWang-Java The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Apr 20, 2022
@mlbridge
Copy link

mlbridge bot commented Apr 20, 2022

Webrevs

@openjdk
Copy link

openjdk bot commented Apr 20, 2022

@JoeWang-Java This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8284920: Incorrect Token type causes XPath expression to return incorrect results

Reviewed-by: naoto, lancea

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 12 new commits pushed to the master branch:

  • b2c33f0: 8282120: optimal capacity tests and test library need to be cleaned up
  • d8446b4: 8284694: Avoid evaluating SSLAlgorithmConstraints twice
  • cb16e41: 8283541: Add Statical counters and some comments in PhaseStringOpts
  • 15ce8c6: 8284553: Deprecate the DEFAULT static field of OAEPParameterSpec
  • e8016f7: 8281006: Module::getResourceAsStream should check if the resource is open unconditionally when caller is null
  • 018017a: 8266247: Swing test bug7154030.java sometimes fails on macOS 11 ARM
  • e6c5f28: 8280594: Refactor annotation invocation handler handling to use Objects.toIdentityString
  • b4a85cd: 8284742: x86: Handle integral division overflow during parsing
  • 5291ec8: 8277969: HttpClient SelectorManager shuts down when custom Executor rejects a task
  • 6c6d522: 8284758: [linux] improve print_container_info
  • ... and 2 more: https://git.openjdk.java.net/jdk/compare/0f81d8fcc3fb703760b1cddb01861ea5031023fb...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 20, 2022
Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me Joe

@JoeWang-Java
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 20, 2022

Going to push as commit 81a8e2f.
Since your change was applied there have been 13 commits pushed to the master branch:

  • 05ae7ed: 8284291: sun/security/krb5/auto/Renew.java fails intermittently on Windows 11
  • b2c33f0: 8282120: optimal capacity tests and test library need to be cleaned up
  • d8446b4: 8284694: Avoid evaluating SSLAlgorithmConstraints twice
  • cb16e41: 8283541: Add Statical counters and some comments in PhaseStringOpts
  • 15ce8c6: 8284553: Deprecate the DEFAULT static field of OAEPParameterSpec
  • e8016f7: 8281006: Module::getResourceAsStream should check if the resource is open unconditionally when caller is null
  • 018017a: 8266247: Swing test bug7154030.java sometimes fails on macOS 11 ARM
  • e6c5f28: 8280594: Refactor annotation invocation handler handling to use Objects.toIdentityString
  • b4a85cd: 8284742: x86: Handle integral division overflow during parsing
  • 5291ec8: 8277969: HttpClient SelectorManager shuts down when custom Executor rejects a task
  • ... and 3 more: https://git.openjdk.java.net/jdk/compare/0f81d8fcc3fb703760b1cddb01861ea5031023fb...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 20, 2022
@openjdk openjdk bot closed this Apr 20, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 20, 2022
@openjdk
Copy link

openjdk bot commented Apr 20, 2022

@JoeWang-Java Pushed as commit 81a8e2f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@JoeWang-Java JoeWang-Java deleted the JDK-8284920 branch April 20, 2022 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
3 participants