Skip to content

Commit

Permalink
Use getParentTreeCursor() in print(Cursor)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Oct 14, 2024
1 parent 403577a commit 2b23a3f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, Execu
}

// Avoid changing reference if the templating didn't actually change the contents of the method
if (m != method && m.print(getCursor()).equals(method.print(getCursor()))) {
if (m != method && m.print(getCursor().getParentTreeCursor()).equals(method.print(getCursor().getParentTreeCursor()))) {
return method;
}
return m;
Expand Down

0 comments on commit 2b23a3f

Please sign in to comment.