Skip to content

Commit

Permalink
Fix TabsAndIndentsVisitor after adding J.Modifier to visitor
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Oct 15, 2024
1 parent 2f1b957 commit c2cb011
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ public Space visitSpace(Space space, Space.Location loc, P p) {
}
}

if (loc == Space.Location.MODIFIER_PREFIX && value instanceof J.MethodDeclaration) {
J.MethodDeclaration m = getCursor().getValue();
if (loc == Space.Location.MODIFIER_PREFIX && value instanceof J.Modifier && parent.getValue() instanceof J.MethodDeclaration) {
J.MethodDeclaration m = parent.getValue();
if (!m.getLeadingAnnotations().isEmpty()) {
alignToAnnotation = true;
}
Expand Down

0 comments on commit c2cb011

Please sign in to comment.