-
Notifications
You must be signed in to change notification settings - Fork 6k
8355204: Consider simplifying type metadata stripping #24775
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back cushon! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@cushon 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 issue a |
/csr |
@vicente-romero-oracle has indicated that a compatibility and specification (CSR) request is needed for this pull request. @cushon please create a CSR request for issue JDK-8355204 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
This change removes support for
stripMetadataIfNeeded
. After JDK-8355065 there are only two uses of the method:Types#directSupertypes
, which is specified as preserving type annotations. This change means that type metadata will be preserved for supertypes that appear in source, as well as substituted types for transitive supertypes.Trees#getTypeMirror
, which doesn't specify whether or not type annotations are preserved.stripMetadataIfNeeded
was added for JDK-8031744. The unconditionalstripMetadata
was added for JDK-8144580.stripMetadata
was substantially reworked to ensure it always stripped annotations in JDK-8042981, which also updated the spec for Types' utility methods to clarify when type annotations were preserved, added a public API for removing annotations from types, and replaced some calls tostripMetadataIfNeeded
withstripMetadata
because the former didn't strip annotations in some cases where stripping was actually needed.I think it's worth considering removing
stripMetadataIfNeeded
. The bookkeeping to keep track of whether or not metadata should be stripped is fragile, and the API use-case can be supported by either preserving metadata or unconditionally stripping it.Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24775/head:pull/24775
$ git checkout pull/24775
Update a local copy of the PR:
$ git checkout pull/24775
$ git pull https://git.openjdk.org/jdk.git pull/24775/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24775
View PR using the GUI difftool:
$ git pr show -t 24775
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24775.diff
Using Webrev
Link to Webrev Comment