Skip to content

Commit

Permalink
Avoid NPE on missing method type in JodaTimeVisitor
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Feb 6, 2025
1 parent bc40657 commit a6f6ea1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ public Javadoc visitReference(Javadoc.Reference reference, ExecutionContext ctx)
J.MethodInvocation m = (J.MethodInvocation) super.visitMethodInvocation(method, ctx);

// internal method with Joda class as return type
if (!method.getMethodType().getDeclaringType().isAssignableFrom(JODA_CLASS_PATTERN) &&
if (method.getMethodType() != null &&
!method.getMethodType().getDeclaringType().isAssignableFrom(JODA_CLASS_PATTERN) &&
method.getType().isAssignableFrom(JODA_CLASS_PATTERN)) {
return migrateNonJodaMethod(method, m);
}
Expand Down

0 comments on commit a6f6ea1

Please sign in to comment.