Skip to content

Commit

Permalink
fix: NPE in no classpath (#5764)
Browse files Browse the repository at this point in the history
Co-authored-by: c00593292 <chenhongxu5@huawei.com>
  • Loading branch information
sretake and hongxuchen committed Aug 15, 2024
1 parent 5d4560b commit 0ea5228
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/spoon/support/visitor/SignaturePrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public <T> void visitCtExecutableReference(CtExecutableReference<T> reference) {

/** writes only the name and parameters' types */
public <T> void writeNameAndParameters(CtExecutableReference<T> reference) {
if (reference.isConstructor()) {
if (reference.isConstructor() && reference.getDeclaringType() != null) {
write(reference.getDeclaringType().getQualifiedName());
} else {
write(reference.getSimpleName());
Expand Down

0 comments on commit 0ea5228

Please sign in to comment.