Skip to content

Commit 637c79a

Browse files
authored
Improve diagnostics
1 parent 1f69ec2 commit 637c79a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

framework/src/main/java/org/checkerframework/framework/stub/AnnotationFileElementTypes.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,13 @@ private void parseAnnotationFiles(List<String> annotationFiles, AnnotationFileTy
452452
public @Nullable AnnotationMirrorSet getDeclAnnotations(Element elt) {
453453
if (stubDebug) {
454454
if (isParsing()) {
455-
System.out.printf("AFET.getDeclAnnotations(%s [%s])%n", elt, elt.getClass());
455+
System.out.printf(
456+
"AFET.getDeclAnnotations(%s [%s]): isParsing() => true, returning emptySet.%n",
457+
elt, elt.getClass());
456458
} else {
457-
System.out.printf("AFET.getDeclAnnotations(%s [%s]) IS NOT PARSING%n", elt, elt.getClass());
459+
System.out.printf(
460+
"AFET.getDeclAnnotations(%s [%s]): isParsing() => false, proceeding.%n",
461+
elt, elt.getClass());
458462
}
459463
}
460464

framework/src/main/java/org/checkerframework/framework/stub/AnnotationFileParser.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,8 @@ private void parseStubUnit(InputStream inputStream) {
770770

771771
/**
772772
* Process {@link #stubUnit}, which is the AST produced by {@link #parseStubUnit}. Processing
773-
* means copying annotations from Stub Parser data structures to {@code #annotationFileAnnos}.
773+
* means copying annotations from Stub Parser data structures to argument {@code
774+
* annotationFileAnnos}.
774775
*
775776
* @param annotationFileAnnos annotations from the file; side-effected by this method
776777
*/
@@ -781,7 +782,7 @@ private void process(AnnotationFileAnnotations annotationFileAnnos) {
781782
}
782783

783784
/**
784-
* Process the given StubUnit: copy its annotations to {@code #annotationFileAnnos}.
785+
* Process the given StubUnit: copy its annotations to {@code this.annotationFileAnnos}.
785786
*
786787
* @param su the StubUnit to process
787788
*/

0 commit comments

Comments
 (0)