RFR: JDK-8042981: Strip type annotations in Types' utility methods [v15]
Jonathan Gibbons
jjg at openjdk.org
Thu Jan 25 22:39:39 UTC 2024
On Thu, 25 Jan 2024 21:35:54 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:
>
> Update spec and tests for getDeclaredType
Approved, but suggest waiting for @lahodaj as well.
src/java.compiler/share/classes/javax/lang/model/util/Types.java line 270:
> 268: * Given the type element for {@code Set} and the type mirror
> 269: * for {@code String},
> 270: * for example, this method may be used to get the
While unrelated to this change, if you cam, I would suggest moving `for example` to the beginning of the sentence, to give the reader more context for the text that follows:
> For example, given the type element for {@code Set} and a type mirror for {@code String},
> this method may be used to get the parameterized type {@code Set<String>}.
-------------
Marked as reviewed by jjg (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/8984#pullrequestreview-1844797947
PR Review Comment: https://git.openjdk.org/jdk/pull/8984#discussion_r1467034294
More information about the compiler-dev
mailing list