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

8333377: Migrate Generic Signature parsing to ClassFile API #19281

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

liach
Copy link
Member

@liach liach commented May 17, 2024

Core reflection's generic signature parsing uses an ancient library with outdated visitor pattern on a tree model and contains unnecessary boilerplates. This is a duplication of ClassFile API's signature model. We should just move to ClassFile API, which is more throughoutly tested as well.

To ensure compatibility, new tests are added to ensure consistent behavior when encountering malformed signatures or signatures with missing types. The reflective objects have been preserved and the only change is that lazy expansion now happens from CF objects, to reduce compatibility risks.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8333377: Migrate Generic Signature parsing to ClassFile API (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19281/head:pull/19281
$ git checkout pull/19281

Update a local copy of the PR:
$ git checkout pull/19281
$ git pull https://git.openjdk.org/jdk.git pull/19281/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19281

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19281.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 17, 2024

👋 Welcome back liach! 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
Copy link

openjdk bot commented May 17, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented May 17, 2024

@liach 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
Copy link

openjdk bot commented May 31, 2024

⚠️ @liach This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@liach liach changed the title Move core reflection Signature tree parsing to ClassFile API 8333377: Migrate Generic Signature parsing to ClassFile API May 31, 2024
@liach liach marked this pull request as ready for review May 31, 2024 22:25
@openjdk openjdk bot added the rfr Pull request is ready for review label May 31, 2024
@mlbridge
Copy link

mlbridge bot commented May 31, 2024

Webrevs

@jddarcy
Copy link
Member

jddarcy commented May 31, 2024

I think I'll need to be one of the reviews on this, but don't anticipate being able to review it before JDK 23 rampdown. Therefore, I think this would be appropriate to be targeted to JDK 24.

@liach
Copy link
Member Author

liach commented Jun 1, 2024

Indeed, I put the JBS issue to target release 24. I believe given the potential behavioral changes, rushing into release 23 is a risky choice. (the 4 new tests can target 23 in a separate patch, but they require removal of a few redundant assertions in old generic code)

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 rfr Pull request is ready for review
3 participants