RFR: JDK-8042981: Strip type annotations in Types' utility methods [v10]

Liam Miller-Cushon cushon at openjdk.org
Fri Jan 19 23:05:43 UTC 2024


On Fri, 19 Jan 2024 06:28:24 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> 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.
>
> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Augment tests.

This looks good to me

test/langtools/tools/javac/processing/model/util/types/TestAnnotationStripping.java line 148:

> 146:         else {
> 147:             // Previously, was likely getting by-catch of annotations
> 148:             // on element declartions, can likely just print the size

typo: `s/declartions/declarations`

And per the explanation in this comment, I think the commented-out case for `jdk.internal.ValueBased` can be removed if the test passes without it

-------------

Marked as reviewed by cushon (Committer).

PR Review: https://git.openjdk.org/jdk/pull/8984#pullrequestreview-1833537216
PR Review Comment: https://git.openjdk.org/jdk/pull/8984#discussion_r1459617560


More information about the compiler-dev mailing list