block() function has @Nullable but is not taken in consideration and if condition leads to “Expression is allways true”
String value = WebClient.builder().build().get()
.uri("http://localhost")
.retrieve()
.bodyToMono(String.class)
.block();
if(value!=null){ //<-- This can be null
}
Supported annotations for this rule are listed here.
Note that we recently updated the list, it will be effective for SonarQube 8.6 and already on SonarCloud.
Can you provide us the fully qualified name of the @Nullable annotation which is not taken into consideration? If it is not already in the list, I would be happy to extend it.