Skip to content

Commit

Permalink
Updates per rewrite 7.19.0 changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
pway99 committed Feb 25, 2022
1 parent 2a64e71 commit dad4ac8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ct
if (resolvedRequestMappingAnnotationClassName != null) {
maybeAddImport("org.springframework.web.bind.annotation." + resolvedRequestMappingAnnotationClassName);
a = (J.Annotation) new ChangeType("org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation." + resolvedRequestMappingAnnotationClassName)
"org.springframework.web.bind.annotation." + resolvedRequestMappingAnnotationClassName, false)
.getVisitor().visit(a, ctx, getCursor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ protected JavaVisitor<ExecutionContext> getVisitor() {
@Override
public J visitCompilationUnit(J.CompilationUnit cu, ExecutionContext ctx) {
J.CompilationUnit c = (J.CompilationUnit)super.visitCompilationUnit(cu, ctx);
doAfterVisit(new ChangeType(originalFqn, targetFqn));
doAfterVisit(new ChangeType(originalFqn, targetFqn, false));
return c;
}

@Override
public J visitParameterizedType(J.ParameterizedType type, ExecutionContext context) {
J.ParameterizedType t = (J.ParameterizedType) super.visitParameterizedType(type, context);
if (t.getClazz() instanceof J.Identifier && TypeUtils.isOfType(TypeUtils.asFullyQualified(t.getClazz().getType()),
TypeUtils.asFullyQualified(JavaType.Class.build(originalFqn))) &&
TypeUtils.asFullyQualified(JavaType.ShallowClass.build(originalFqn))) &&
t.getTypeParameters() != null && t.getTypeParameters().size() == 2) {
t = t.withTypeParameters(t.getTypeParameters().subList(0, 1));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex
@Override
public J.CompilationUnit visitCompilationUnit(J.CompilationUnit cu, ExecutionContext executionContext) {
J.CompilationUnit compilationUnit = super.visitCompilationUnit(cu, executionContext);
doAfterVisit(new ChangeType(fromExtendingFqn, toImplementsFqn));
doAfterVisit(new ChangeType(fromExtendingFqn, toImplementsFqn, false));
return compilationUnit;
}
};
Expand Down

0 comments on commit dad4ac8

Please sign in to comment.