PicnicSupermarket / error-prone-support

Error Prone extensions: extra bug checkers and a large battery of Refaster rules.
https://error-prone.picnic.tech
MIT License
196 stars 38 forks source link

Introduce `MonoFromFutureSupplier{,Boolean}` Refaster rules #1244

Closed Venorcis closed 3 months ago

Venorcis commented 3 months ago

Futures subscribe eagerly. This means that Mono#fromFuture(CompletableFuture) already executes the contents of the future on assembly time (even when that Future is constructed from a Mono as we do in our reactive Caffeine caches).

I therefore suggest instead to always use Mono#fromFuture(Supplier), which will only instantiate (and thus execute) the future on subscription, i.e. much closer to how we usually do everything 😄

github-actions[bot] commented 3 months ago

Looks good. No mutations were possible for these changes. Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

github-actions[bot] commented 3 months ago

Looks good. No mutations were possible for these changes. Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud