Skip to content

Commit

Permalink
fix crash in code
Browse files Browse the repository at this point in the history
  • Loading branch information
Luro02 committed Apr 11, 2024
1 parent 4c61fe7 commit 33b0cf0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ private <T> void checkCtMethod(CtMethod<T> ctMethod) {
return;
}

if (ctMethod.getBody() == null) {
return;
}

if (prefix.equals("set") && isInvalidSetterReturnType(ctMethod) && SpoonUtil.getEffectiveStatements(ctMethod.getBody()).size() <= 3) {
// it is expected that a setter returns nothing (void)
this.reportProblem(
Expand Down

0 comments on commit 33b0cf0

Please sign in to comment.