Skip to content

Commit ca4be5e

Browse files
authored
fix: Replaced programmatic with injected JavaParser (#808)
1 parent 2ea2754 commit ca4be5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/sbm-core/src/main/java/org/springframework/sbm/java/impl/OpenRewriteType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public List<Annotation> getAnnotations() {
105105
@Override
106106
public void addAnnotation(String fqName) {
107107
// FIXME: Hack, JavaParser should have latest classpath
108-
Supplier<JavaParser> javaParserSupplier = () -> JavaParser.fromJavaVersion().classpath(ClasspathRegistry.getInstance().getCurrentDependencies()).build();
108+
Supplier<JavaParser> javaParserSupplier = () -> javaParser;
109109
String snippet = "@" + fqName.substring(fqName.lastIndexOf('.') + 1);
110110
AddAnnotationVisitor addAnnotationVisitor = new AddAnnotationVisitor(javaParserSupplier, getClassDeclaration(), snippet, fqName);
111111
refactoring.refactor(rewriteSourceFileHolder, addAnnotationVisitor);

0 commit comments

Comments
 (0)