Skip to content

Commit

Permalink
Add null check to JodaTimeVisitor
Browse files Browse the repository at this point in the history
Fixes #634
  • Loading branch information
timtebeek authored Dec 18, 2024
1 parent bb00d0a commit 713b88e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public Javadoc visitReference(Javadoc.Reference reference, ExecutionContext ctx)
}

private J migrateMethodCall(MethodCall original, MethodCall updated) {
if (!original.getMethodType().getDeclaringType().isAssignableFrom(JODA_CLASS_PATTERN)) {
if (original.getMethodType() == null || !original.getMethodType().getDeclaringType().isAssignableFrom(JODA_CLASS_PATTERN)) {
return updated; // not a joda type, no need to migrate
}
MethodTemplate template = AllTemplates.getTemplate(original);
Expand Down

0 comments on commit 713b88e

Please sign in to comment.