On Fri, 11 Jun 2021 13:09:55 GMT, Jan Lahoda <jlah...@openjdk.org> wrote:

> [this is an improved version of openjdk/jdk PR:
> https://github.com/openjdk/jdk/pull/4428
> ]
> 
> The ct.sym may contain classfiles referring to annotations that are not 
> present in ct.sym (liek JDK's internal annotation sun.misc.Contended). If 
> javac will try to load them (while discovering annotations for the purpose of 
> detecting which annotation processors should be run), an error will be 
> produced (please see the issue). The proposal is to strip annotations that 
> are not present in ct.sym when generating ct.sym.
> 
> As noted by @jddarcy, we also need a special handling of ValueBased, which 
> this patch should do, so it also solves 
> https://bugs.openjdk.java.net/browse/JDK-8258421

I was wondering how better to document that the addition of new JDK-specific 
annotation types might require more updates to this list.

Perhaps adding notes in the existing annotation types would help, as people 
might cut-and-paste the old types when creating new ones. That may be more 
effective than adding package-level documentation on the internal packages.

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

Marked as reviewed by darcy (Reviewer).

PR: https://git.openjdk.java.net/jdk17/pull/27

Reply via email to