On Wed, 9 Jun 2021 11:05:37 GMT, Jan Lahoda <[email protected]> wrote:

> 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.

make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java line 
311:

> 309:     private static final String PREVIEW_FEATURE_ANNOTATION_INTERNAL =
> 310:             "Ljdk/internal/PreviewFeature+Annotation;";
> 311:     public static final Set<String> HARDCODED_ANNOTATIONS = new 
> HashSet<>(

shouldn't PREVIEW_FEATURE_ANNOTATION_INTERNAL be added to HARDCODED_ANNOTATIONS 
too?

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

PR: https://git.openjdk.java.net/jdk/pull/4428

Reply via email to