Skip to content

Commit

Permalink
Merge branch 'main' into refactor/gradle-tooling-model-assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden authored Feb 20, 2024
2 parents 1d83f96 + 9deb572 commit b741c78
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl,
getCursor(),
cd.getCoordinates().addImplementsClause()
);
cd = (J.ClassDeclaration) new RemoveSuperStatementVisitor().visitNonNull(cd, ctx, getCursor());
cd = (J.ClassDeclaration) new RemoveSuperStatementVisitor().visitNonNull(cd, ctx, getCursor().getParentOrThrow());
maybeRemoveImport(fullyQualifiedClassName);
maybeAddImport(fullyQualifiedInterfaceName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ 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().visitNonNull(a, ctx, getCursor());
.getVisitor().visitNonNull(a, ctx, getCursor().getParentOrThrow());
a = autoFormat(a, ctx);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ct
.build()
.apply(getCursor(),
anno.getCoordinates().replaceArguments(),
buildTwoStringsArray(str));
(Object[]) buildTwoStringsArray(str));
return autoFormat(replacement, ctx);
}
} else {
Expand All @@ -90,7 +90,7 @@ public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ct
.build()
.<J.Annotation>apply(getCursor(),
anno.getCoordinates().replaceArguments(),
buildTwoStringsArray(str)).getArguments().get(0);
(Object[]) buildTwoStringsArray(str)).getArguments().get(0);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex
.classpathFromResources(ctx, "spring-webmvc-5.*"))
.build().apply(getCursor(), cd.getCoordinates().addImplementsClause());
updateCursor(cd);
cd = (J.ClassDeclaration) new RemoveSuperStatementVisitor().visitNonNull(cd, ctx, getCursor());
cd = (J.ClassDeclaration) new RemoveSuperStatementVisitor().visitNonNull(cd, ctx, getCursor().getParentOrThrow());
maybeRemoveImport("org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter");
maybeAddImport("org.springframework.web.servlet.config.annotation.WebMvcConfigurer");
}
Expand Down

0 comments on commit b741c78

Please sign in to comment.