diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsage.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsage.java index 9247cfb9449..ac5d7636b6d 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsage.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsage.java @@ -59,7 +59,7 @@ public final class FluxFlatMapUsage extends BugChecker .namedAnyOf("flatMap", "flatMapSequential") .withParameters(Function.class.getName()); private static final com.google.errorprone.suppliers.Supplier FLUX = - Suppliers.typeFromClass(Flux.class); + Suppliers.typeFromString("reactor.core.publisher.Flux"); @Override public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsageTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsageTest.java index 7b3fc8c6c6b..65a14a890a5 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsageTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsageTest.java @@ -76,6 +76,7 @@ void replacementFirstSuggestedFix() { "", "class A {", " private static final int MAX_CONCURRENCY = 8;", + "", " void m() {", " Flux.just(1).flatMap(Flux::just);", " Flux.just(1).flatMapSequential(Flux::just);", @@ -89,6 +90,7 @@ void replacementFirstSuggestedFix() { "", "class A {", " private static final int MAX_CONCURRENCY = 8;", + "", " void m() {", " Flux.just(1).concatMap(Flux::just);", " Flux.just(1).concatMap(Flux::just);",