I have one method in c#. Before calling method i checked not null condition of the parameter. But inside the method i didn’t check null condition. why it’s showing as bug? because i checked before calling a function. both the functions are in same file?
public void F1()
if(data != null)
public void F2(int p1)
Thank you for reaching out to us.
For the time being we don’t support cross method analysis. So, our analyzer does not know that a null check was done before the invocation.
On the other hand I would not call this a false positive, because there might be other invocations of F2 without the null check in place. I suggest to move the check inside F2.