RFR: JDK-8323684: TypeMirror.{getAnnotationsByType, getAnnotation} return uninformative results [v2]

Joe Darcy darcy at openjdk.org
Thu Jan 18 00:13:26 UTC 2024


On Thu, 18 Jan 2024 00:01:28 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8323684
>>  - Appease jcheck.
>>  - Add regression tests.
>>  - JDK-8323684: TypeMirror.{getAnnotationsByType, getAnnotation} return uninformative results
>
> test/langtools/tools/javac/processing/model/type/BasicAnnoTests.java line 92:
> 
>> 90:     PrintWriter out;
>> 91:     boolean verbose = true;
>> 92:     static Map<String, Class<? extends Annotation>> nameToAnnotation;
> 
> this looks questionable ... a mutable static field

Good point -- the mapping should be static given the method it is used in are static; I'll change to a static final. Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17410#discussion_r1456641403


More information about the compiler-dev mailing list