diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterMethodParameterOrder.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterMethodParameterOrder.java index ff92688bf83..46575300b3b 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterMethodParameterOrder.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterMethodParameterOrder.java @@ -47,6 +47,8 @@ * {@code @AfterTemplate} method. Ties are broken by preferring the order dictated by methods with a * larger number of parameters. */ +// XXX: This check can introduce suggestions that are incompatible with Error Prone's +// `InconsistentOverloads` check. Review whether/how to improve this. @AutoService(BugChecker.class) @BugPattern( summary = "Refaster template parameters should be listed in a canonical order", diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java index 959a9085b89..927adb4217b 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java @@ -437,10 +437,12 @@ Flux after(Flux flux, T object) { static final class FluxEmpty> { @BeforeTemplate Flux before( - int prefetch, Function combinator, + int prefetch, Comparator comparator) { return Refaster.anyOf( + Flux.zip(combinator), + Flux.zip(combinator, prefetch), Flux.concat(), Flux.concatDelayError(), Flux.firstWithSignal(), @@ -456,13 +458,11 @@ Flux before( Flux.mergePriorityDelayError(prefetch, comparator), Flux.mergeSequential(), Flux.mergeSequential(prefetch), - Flux.mergeSequentialDelayError(prefetch), - Flux.zip(combinator), - Flux.zip(combinator, prefetch)); + Flux.mergeSequentialDelayError(prefetch)); } @BeforeTemplate - Flux before(int prefetch, Function combinator) { + Flux before(Function combinator, int prefetch) { return Refaster.anyOf( Flux.combineLatest(combinator), Flux.combineLatest(combinator, prefetch)); } @@ -1125,9 +1125,9 @@ Flux before( Function function, @Matches(IsIdentityOperation.class) Function> identityOperation, + int prefetch, boolean delayUntilEnd, - int maxConcurrency, - int prefetch) { + int maxConcurrency) { return Refaster.anyOf( mono.map(function).flatMapMany(identityOperation), mono.flux().concatMap(function),