From 7917c682f56fa997a7b0af1d9af31be9cbb711a0 Mon Sep 17 00:00:00 2001 From: "Mckinney, Nicholas" Date: Thu, 17 Oct 2024 10:47:15 -0400 Subject: [PATCH] adjusting precondition of MigrateWebMvcTagsToObservationConvention per @Laurens-W suggestion --- .../boot3/MigrateWebMvcTagsToObservationConvention.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/openrewrite/java/spring/boot3/MigrateWebMvcTagsToObservationConvention.java b/src/main/java/org/openrewrite/java/spring/boot3/MigrateWebMvcTagsToObservationConvention.java index 6f71d7e1c..1d292fa3b 100644 --- a/src/main/java/org/openrewrite/java/spring/boot3/MigrateWebMvcTagsToObservationConvention.java +++ b/src/main/java/org/openrewrite/java/spring/boot3/MigrateWebMvcTagsToObservationConvention.java @@ -24,7 +24,7 @@ import org.openrewrite.java.JavaTemplate; import org.openrewrite.java.JavaVisitor; import org.openrewrite.java.MethodMatcher; -import org.openrewrite.java.search.UsesType; +import org.openrewrite.java.search.FindImplementations; import org.openrewrite.java.tree.*; import java.util.ArrayList; @@ -68,7 +68,7 @@ public String getDescription() { @Override public TreeVisitor getVisitor() { - return Preconditions.check(new UsesType<>(WEBMVCTAGSPROVIDER_FQ, true), new JavaVisitor() { + return Preconditions.check(new FindImplementations(WEBMVCTAGSPROVIDER_FQ), new JavaVisitor() { @Override public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, ExecutionContext ctx) { J.MethodDeclaration getTagsMethod = null;