PicnicSupermarket / error-prone-support

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

Introduce `MonoDeferContextualFromSupplier` refaster rule #1260

Closed mohamedsamehsalah closed 1 month ago

github-actions[bot] commented 1 month 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 1 month 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

mohamedsamehsalah commented 1 month ago

That won't work since ContextView#get throws an exception rather than resolve to null.

Stephan202 commented 1 month ago

I suppose Mono.deferContextual(contextView -> Mono.justOrEmpty(contextView.getOrEmpty(key))) could work, but it's not clearly better. So fine not to have a rule for this :+1: