Skip to content

Commit

Permalink
Appease the bot
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Aug 2, 2024
1 parent 45ca436 commit b3b9af9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1222,14 +1222,15 @@ void replaceMethodInChainFollowedByGenericTypeParameters() {
rewriteRun(
spec -> spec.recipe(toRecipe(() -> new JavaVisitor<>() {
@Override
public J visitMethodInvocation(J.MethodInvocation method, ExecutionContext executionContext) {
public J visitMethodInvocation(J.MethodInvocation method, ExecutionContext ctx) {
if (new MethodMatcher("batch.StepBuilder create()").matches(method)) {
return JavaTemplate.builder("new StepBuilder()")
//.doBeforeParseTemplate(System.out::println)
.contextSensitive()
.build()
.apply(getCursor(), method.getCoordinates().replace());
}
return super.visitMethodInvocation(method, executionContext);
return super.visitMethodInvocation(method, ctx);
}
}))
.parser(JavaParser.fromJavaVersion().dependsOn(
Expand Down

0 comments on commit b3b9af9

Please sign in to comment.