SonarLint shows false positive for @Nullable block() method with Webflux


I don’t know if this is the right place to report this, but SonarLint shows a wrong “Expression always evaluated to true error”. Webflux block() method is annotated with @Nullable, but SonarLint says it’s @NotNull.

Hello Jan,

Thanks for joining the community and raising this issue.

The block() method is annotated with reactor.util.annotation.Nullable which is supposed to be supported by our Java analyzer.

I managed to reproduce locally and attached a reproducer project, that will help us further investigate the issue. (59.7 KB)

Thanks again,

1 Like