diff --git a/rewrite-java/src/main/java/org/openrewrite/java/recipes/SetDefaultEstimatedEffortPerOccurrence.java b/rewrite-java/src/main/java/org/openrewrite/java/recipes/SetDefaultEstimatedEffortPerOccurrence.java index 65db18f5190..8038ef4bc78 100644 --- a/rewrite-java/src/main/java/org/openrewrite/java/recipes/SetDefaultEstimatedEffortPerOccurrence.java +++ b/rewrite-java/src/main/java/org/openrewrite/java/recipes/SetDefaultEstimatedEffortPerOccurrence.java @@ -55,12 +55,11 @@ public TreeVisitor getVisitor() { "@Override public Duration getEstimatedEffortPerOccurrence() {\n" + "return Duration.ofMinutes(5);\n" + "}") - .contextSensitive() .imports("java.time.Duration") .build(); @Override - public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, ExecutionContext executionContext) { + public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, ExecutionContext ctx) { JavaType.FullyQualified type = TypeUtils.asFullyQualified(classDecl.getType()); if (TypeUtils.isAssignableTo("org.openrewrite.Recipe", type)) { assert type != null; @@ -87,7 +86,7 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex throw new RuntimeException(e); } } - return super.visitClassDeclaration(classDecl, executionContext); + return super.visitClassDeclaration(classDecl, ctx); } }); }