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

8258535: jvm.ClassReader should set the accessor to the corresponding record component #4152

Conversation

vicente-romero-oracle
Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle commented May 22, 2021

Please review this fix which addresses a bug in the records implementation. The issue is that when a record is read by jvm.ClassReader, the record components are not linked to its corresponding accessor. If users try to look for the accessor using javax.lang.model API, using an annotation processor for example, then they will find that the accessor is null.

TIA for the review


Progress

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

Issue

  • JDK-8258535: jvm.ClassReader should set the accessor to the corresponding record component

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4152

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented May 22, 2021

👋 Welcome back vromero! 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 label May 22, 2021
@openjdk
Copy link

openjdk bot commented May 22, 2021

@vicente-romero-oracle The following label will be automatically applied to this pull request:

  • compiler

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 compiler label May 22, 2021
@mlbridge
Copy link

mlbridge bot commented May 22, 2021

Webrevs

jbf
jbf approved these changes May 24, 2021
Copy link
Member

@jbf jbf left a comment

Lgtm

@openjdk
Copy link

openjdk bot commented May 24, 2021

@vicente-romero-oracle 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:

8258535: jvm.ClassReader should set the accessor to the corresponding record component

Reviewed-by: jfranck

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 11 new commits pushed to the master branch:

  • 49f622c: 8208747: [a11y] [macos] In Optionpane Demo, inside ComponentDialog Example, unable to navigate to all items, with VO on
  • 54520fb: 8267580: The method JavacParser#peekToken is wrong when the first parameter is not zero
  • 3113910: 8267553: Extra JavaThread assignment in ClassLoader::create_class_path_entry()
  • 4d26f22: 8264304: Create implementation for NSAccessibilityToolbar protocol peer
  • 6288a99: 8267404: vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java failed with OutOfMemoryError
  • 71e2fa2: 8267531: [x86] Assembler::andb(Address,Register) encoding is incorrect
  • 4023646: 8266528: Optimize C2 VerifyIterativeGVN execution time
  • 2462316: 8261354: SIGSEGV at MethodIteratorHost
  • 72c9567: 8263486: Clean up MTLSurfaceDataBase.h
  • fe33343: 8256304: should MonitorUsedDeflationThreshold be experimental or diagnostic
  • ... and 1 more: https://git.openjdk.java.net/jdk/compare/94cfeb9c4fee2ba5db8e5efa6b0f2041400c8b3a...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 label May 24, 2021
@vicente-romero-oracle
Copy link
Contributor Author

vicente-romero-oracle commented May 24, 2021

/integrate

@openjdk openjdk bot closed this May 24, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels May 24, 2021
@openjdk
Copy link

openjdk bot commented May 24, 2021

@vicente-romero-oracle Since your change was applied there have been 13 commits pushed to the master branch:

  • d8e6e28: 8267544: (test) rmi test NonLocalSkeleton fails if network has multiple adapters with the same address
  • f453166: 8267578: Remove unnecessary preview checks
  • 49f622c: 8208747: [a11y] [macos] In Optionpane Demo, inside ComponentDialog Example, unable to navigate to all items, with VO on
  • 54520fb: 8267580: The method JavacParser#peekToken is wrong when the first parameter is not zero
  • 3113910: 8267553: Extra JavaThread assignment in ClassLoader::create_class_path_entry()
  • 4d26f22: 8264304: Create implementation for NSAccessibilityToolbar protocol peer
  • 6288a99: 8267404: vmTestbase/vm/mlvm/anonloader/stress/oome/metaspace/Test.java failed with OutOfMemoryError
  • 71e2fa2: 8267531: [x86] Assembler::andb(Address,Register) encoding is incorrect
  • 4023646: 8266528: Optimize C2 VerifyIterativeGVN execution time
  • 2462316: 8261354: SIGSEGV at MethodIteratorHost
  • ... and 3 more: https://git.openjdk.java.net/jdk/compare/94cfeb9c4fee2ba5db8e5efa6b0f2041400c8b3a...master

Your commit was automatically rebased without conflicts.

Pushed as commit f5562f1.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler integrated
2 participants