Open Ao-senXiong opened 5 months ago
apprently, this clearAnnotations clear everything https://github.com/eisop/checker-framework/blob/481040f5af69012d3b410e1844f31d84fff7b7c4/framework/src/main/java/org/checkerframework/framework/stub/AnnotationFileParser.java#L1524.
A side comment: you are using ./checker/bin/javac
which automatically adds all CF jar files. You only need to add the directories with the test annotations, if they are necessary.
A side comment: you are using
./checker/bin/javac
which automatically adds all CF jar files. You only need to add the directories with the test annotations, if they are necessary.
Thanks, I have updated the description.
Based on the furthur debugging, looks like this issue is related to stubTypes
field is different in Java 11 and Java 17 https://github.com/eisop/checker-framework/blob/f8fd1a87488065d38dbf7442d2d2a1d8f9e66674/framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeFactory.java#L2687
More specificly, this field in AnnotationFileElementTypes.AnnotationFileParser
.
https://github.com/eisop/checker-framework/blob/f8fd1a87488065d38dbf7442d2d2a1d8f9e66674/framework/src/main/java/org/checkerframework/framework/stub/AnnotationFileParser.java#L308
Script
code
Stacktrace:
Reason (Java 11):
Java 17: