diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/RxJavaToReactorTemplates.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/RxJavaToReactorTemplates.java index 307c2d47..a859efdf 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/RxJavaToReactorTemplates.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/RxJavaToReactorTemplates.java @@ -19,6 +19,8 @@ import reactor.core.publisher.Mono; final class RxJavaToReactorTemplates { private RxJavaToReactorTemplates() {} + // Flowable.concatWith. + // XXX: `function` type change; look into `Refaster.canBeCoercedTo(...)`. static final class FlowableFilter { @BeforeTemplate @@ -110,6 +112,11 @@ final class RxJavaToReactorTemplates { } // XXX: Stephan, this is actually the static method, therefore I don't think it is correct. + // I think we don't want this. + // But what about all the other things; `{Maybe,Flowable,Single}.just()` and these kinds of + // methods? + // We will need to rewrite those. + // static final class MaybeDefer { // @BeforeTemplate // Maybe before(Maybe maybe, Callable> source) { @@ -122,6 +129,22 @@ final class RxJavaToReactorTemplates { // } // } +// XXX: Check with Stephan. +// static final class MaybeFlatMap { +// @BeforeTemplate +// Maybe before(Maybe maybe, Function> function) { +// return maybe.flatMap(function); +// } +// +// @AfterTemplate +// Maybe after(Maybe maybe, java.util.function.Function> function) { +// return maybe +// .as(RxJava2Adapter::maybeToMono) +// .flatMap(function) +// .as(RxJava2Adapter::monoToMaybe); +// } +// } + // static final class MaybeFlatMapSingleElement< // I, T extends I, O, P extends SingleSource> { // { // @BeforeTemplate @@ -153,8 +176,6 @@ final class RxJavaToReactorTemplates { } } - // ignoreelement. - static final class MaybeSwitchIfEmpty { @BeforeTemplate Single before(Maybe maybe, Single single) {