jdk icon indicating copy to clipboard operation
jdk copied to clipboard

JDK-8042981: Strip type annotations in Types' utility methods

Open jddarcy opened this issue 2 years ago • 16 comments

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

jddarcy avatar Jun 02 '22 01:06 jddarcy

: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.

bridgekeeper[bot] avatar Jun 02 '22 01:06 bridgekeeper[bot]

@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.

openjdk[bot] avatar Jun 02 '22 01:06 openjdk[bot]

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.

Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.

sadayapalam avatar Jun 24 '22 07:06 sadayapalam

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.

Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.

sadayapalam avatar Jun 24 '22 07:06 sadayapalam

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.

Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.

sadayapalam avatar Jun 24 '22 08:06 sadayapalam

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 avatar Jun 26 '22 22:06 jddarcy

@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!

bridgekeeper[bot] avatar Jul 25 '22 07:07 bridgekeeper[bot]

Keep-alive.

jddarcy avatar Jul 25 '22 17:07 jddarcy

@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!

bridgekeeper[bot] avatar Aug 22 '22 23:08 bridgekeeper[bot]

Keep alive.

jddarcy avatar Aug 22 '22 23:08 jddarcy

@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!

bridgekeeper[bot] avatar Sep 20 '22 07:09 bridgekeeper[bot]

Keep alive again.

jddarcy avatar Sep 21 '22 03:09 jddarcy

FWIW I did some testing with the current version of the patch, and didn't see any compatibility impact.

cushon avatar Sep 22 '22 16:09 cushon

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.

jddarcy avatar Sep 23 '22 05:09 jddarcy

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.

Your comment will be automatically restored once you have accepted the OpenJDK Terms of Use.

sadayapalam avatar Oct 14 '22 04:10 sadayapalam

@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!

bridgekeeper[bot] avatar Nov 11 '22 09:11 bridgekeeper[bot]

@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.

bridgekeeper[bot] avatar Dec 09 '22 10:12 bridgekeeper[bot]

/open

jddarcy avatar Dec 09 '22 17:12 jddarcy

@jddarcy This pull request is now open

openjdk[bot] avatar Dec 09 '22 17:12 openjdk[bot]

@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!

bridgekeeper[bot] avatar Jan 06 '23 23:01 bridgekeeper[bot]

@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.

bridgekeeper[bot] avatar Feb 04 '23 04:02 bridgekeeper[bot]

/open

jddarcy avatar Feb 06 '23 18:02 jddarcy

@jddarcy This pull request is now open

openjdk[bot] avatar Feb 06 '23 18:02 openjdk[bot]

@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!

bridgekeeper[bot] avatar Mar 07 '23 00:03 bridgekeeper[bot]

keep-alive

jddarcy avatar Mar 07 '23 00:03 jddarcy

@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!

bridgekeeper[bot] avatar Apr 04 '23 04:04 bridgekeeper[bot]

Still keep-alive.

jddarcy avatar Apr 06 '23 04:04 jddarcy

@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!

bridgekeeper[bot] avatar May 05 '23 03:05 bridgekeeper[bot]

@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.

bridgekeeper[bot] avatar Jun 02 '23 09:06 bridgekeeper[bot]