diff --git a/src/main/java/org/openrewrite/java/spring/http/ReplaceStringLiteralsWithMediaTypeConstants.java b/src/main/java/org/openrewrite/java/spring/http/ReplaceStringLiteralsWithMediaTypeConstants.java index 091220042..2a98f08ee 100644 --- a/src/main/java/org/openrewrite/java/spring/http/ReplaceStringLiteralsWithMediaTypeConstants.java +++ b/src/main/java/org/openrewrite/java/spring/http/ReplaceStringLiteralsWithMediaTypeConstants.java @@ -134,11 +134,11 @@ public J preVisit(J tree, ExecutionContext ctx) { } static boolean declaresSpringWebDependency(SourceFile sourceFile, ExecutionContext ctx) { - TreeVisitor visitor = new DependencyInsight("org.springframework", "spring-web", "compile", null).getVisitor(); + TreeVisitor visitor = new DependencyInsight("org.springframework", "spring-web", "compile", null, null).getVisitor(); if (visitor.isAcceptable(sourceFile, ctx) && visitor.visit(sourceFile, ctx) != sourceFile) { return true; } - visitor = new org.openrewrite.gradle.search.DependencyInsight("org.springframework", "spring-web", "compileClasspath").getVisitor(); + visitor = new org.openrewrite.gradle.search.DependencyInsight("org.springframework", "spring-web", "compileClasspath", null).getVisitor(); return visitor.isAcceptable(sourceFile, ctx) && visitor.visit(sourceFile, ctx) != sourceFile; } }