SonarCloud Report Warning S3900 for non-null objects

I am running into an issue that I have no way to resolved S3900 warnings for large sections of my code because it seems like SonarQube is not properly recognizing the nullability of objects. For example, S3900 is reported for argument b

But b cannot be null and the framework seems to understand that. If I put a conditional access qualifier, then I get a message indicating that expression is never null according to the type annotations. Following other suggestions I tried to add the various NotNull attributes but they were shown as redundant as well:

Lastly, I attempted to use the ValidatedNotNullAttribute(as suggested here), but still the S3900 warning is still reported

Am I misunderstanding this warning? Based on everything I read, this warning is about checking for null, but everything I attempted to implement is shown as redundant/not needed, because the parameter cannot be null in the first place, or it simply didn’t get rid of the warning, such as using the ValidatedNotNullAttribute.

  • Operating system: Windows 11 Enterprise N
  • Visual Studio version: Professional 2022 v17.14.19
  • SonarQube for Visual Studio plugin version: 9.4.0.16052
  • Programming language you’re coding in: C#
  • Is connected mode used: SonarQube Cloud