jdk
jdk copied to clipboard
JDK-8042981: Strip type annotations in Types' utility methods
Early review for JDK-8042981: "Strip type annotations in Types' utility methods". I work more often in the Element world rather than the Type word of the annotation processing APIs.
The type annotations on primitive types are not cleared by the existing annotation clearing mechanisms. I suspect Type.Visitor is missing a case for primitive types. Someone with familiarity with javac's type modeling should take a look; thanks.
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issue
- JDK-8042981: Strip type annotations in Types' utility methods
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/8984/head:pull/8984
$ git checkout pull/8984
Update a local copy of the PR:
$ git checkout pull/8984
$ git pull https://git.openjdk.org/jdk pull/8984/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 8984
View PR using the GUI difftool:
$ git pr show -t 8984
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/8984.diff
:wave: Welcome back darcy! 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.
@jddarcy 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.
Webrevs
- 16: Full - Incremental (425516af)
- 15: Full - Incremental (ef6e1e64)
- 14: Full - Incremental (e5ccaa71)
- 13: Full - Incremental (aa9154b2)
- 12: Full - Incremental (0003be28)
- 11: Full - Incremental (450ae6b2)
- 10: Full - Incremental (bacbd1dd)
- 09: Full - Incremental (2ad7f7ec)
- 08: Full - Incremental (48990299)
- 07: Full (72b9333a)
- 06: Full - Incremental (e389818d)
- 05: Full - Incremental (342b091f)
- 04: Full - Incremental (e9200876)
- 03: Full - Incremental (78d4c299)
- 02: Full - Incremental (61cf9717)
- 01: Full - Incremental (0dacb981)
- 00: Full (8c0e1817)
Hi @sadayapalam, thanks for making a comment in an OpenJDK project!
All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use "Add GitHub user sadayapalam for the summary.
If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.
- [ ] I agree to the OpenJDK Terms of Use for all comments I make in a project in the OpenJDK GitHub organization.
Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.
Hi @sadayapalam, thanks for making a comment in an OpenJDK project!
All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use "Add GitHub user sadayapalam for the summary.
If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.
- [ ] I agree to the OpenJDK Terms of Use for all comments I make in a project in the OpenJDK GitHub organization.
Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.
Hi @sadayapalam, thanks for making a comment in an OpenJDK project!
All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use "Add GitHub user sadayapalam for the summary.
If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.
- [ ] I agree to the OpenJDK Terms of Use for all comments I make in a project in the OpenJDK GitHub organization.
Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.
Also worth observing is there already being several overrides of com.sun.tools.javac.code.Types.MapVisitor#visitType where the idempotent return is unsuitable. So it seems the present problem also should simply override and handle suitably as opposed to introducing a new method.
Thanks @sadayapalam, adding the method you suggested resolved the issue and allows all the existing langtools regression tests to pass.
I updated the directSupertypes spec to have the annotations preserved, which was the (reasonable) behavior expected by an existing type annotations test.
I'll take another pass over refining the spec and tests.
@jddarcy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
Keep-alive.
@jddarcy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
Keep alive.
@jddarcy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
Keep alive again.
FWIW I did some testing with the current version of the patch, and didn't see any compatibility impact.
FWIW I did some testing with the current version of the patch, and didn't see any compatibility impact.
Thanks for the testing Liam. Completing this patch has gotten swapped out for me, but I intend to swap it back in for JDK 20.
Hi @sadayapalam, thanks for making a comment in an OpenJDK project!
All comments and discussions in the OpenJDK Community must be made available under the OpenJDK Terms of Use. If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please Use "Add GitHub user sadayapalam for the summary.
If you are not an OpenJDK Author, Committer or Reviewer, simply check the box below to accept the OpenJDK Terms of Use for your comments.
- [ ] I agree to the OpenJDK Terms of Use for all comments I make in a project in the OpenJDK GitHub organization.
Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.
@jddarcy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
@jddarcy This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open
pull request command.
/open
@jddarcy This pull request is now open
@jddarcy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
@jddarcy This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open
pull request command.
/open
@jddarcy This pull request is now open
@jddarcy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
keep-alive
@jddarcy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
Still keep-alive.
@jddarcy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
@jddarcy This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open
pull request command.