From d6e16f7e10ba628dd948f6f6fc36ae9a8b0044e0 Mon Sep 17 00:00:00 2001 From: Stephan Schroevers Date: Fri, 19 Aug 2022 19:27:28 +0200 Subject: [PATCH] Add another `XXX` comment --- .../java/tech/picnic/errorprone/bugpatterns/NonEmptyMono.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonEmptyMono.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonEmptyMono.java index 37f530be56..8019039880 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonEmptyMono.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonEmptyMono.java @@ -31,6 +31,9 @@ linkType = NONE, severity = WARNING, tags = SIMPLIFICATION) +// XXX: This check does not simplify `someFlux.defaultIfEmpty(T).{defaultIfEmpty(T),hasElements()}`, +// as `someFlux.defaultIfEmpty(T)` yields a `Flux` rather than a `Mono`. Consider adding support for +// these cases. // XXX: Given more advanced analysis many more expressions could be flagged. Consider // `Mono.just(someValue)`, `Flux.just(someNonEmptySequence)`, // `someMono.switchIfEmpty(someProvablyNonEmptyMono)` and many other variants.