Skip to content

Commit

Permalink
ReplaceExtendWithAndContextConfiguration - only autoformat if other c…
Browse files Browse the repository at this point in the history
…hanges were made
  • Loading branch information
Nick McKinney committed Jan 3, 2024
1 parent d95bfad commit eead6cf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ct
maybeRemoveImport(FQN_CONTEXT_CONFIGURATION);
maybeAddImport(FQN_SPRING_JUNIT_CONFIG);
a = (J.Annotation) new ChangeType(FQN_CONTEXT_CONFIGURATION, FQN_SPRING_JUNIT_CONFIG, false)
.getVisitor().visit(a, ctx, getCursor());
.getVisitor().visitNonNull(a, ctx, getCursor());
a = autoFormat(a, ctx);
}

return a != null ? autoFormat(a, ctx) : annotation;
return a;
}

private void replaceValueArgumentWithLocations(J.Annotation a, List<Expression> newArgs) {
Expand Down

0 comments on commit eead6cf

Please sign in to comment.