Skip to content

Commit

Permalink
Issue #295: Fix NPE When visit annotation type (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruil1n authored Nov 29, 2023
1 parent bb765b9 commit c3139c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/gumtree/spoon/builder/LabelFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ public void visitCtComment(CtComment comment) {

@Override
public <T extends Annotation> void visitCtAnnotation(CtAnnotation<T> annotation) {
label = annotation.getType().getQualifiedName();
if (annotation.getType() != null) {
label = annotation.getType().getQualifiedName();
}
}

@Override
Expand Down

0 comments on commit c3139c8

Please sign in to comment.