False Positive with vbnet:S5944

Using SonarCloud, the following code now trips with vbnet:S5944:

    Private Shared Function InvestigationLookup(ii As IncidentInvestigation, answer As String) As IncidentInvestigation
        If String.IsNullOrEmpty(answer) Then
            ii.AnswerAsInvestigationLookups = Nothing
        Else
            Dim ils As New List(Of InvestigationLookup)
            ' Issue flagged above line...
1 Like

Another case, would be:

Public Function Correspondence(ByVal id As Integer) As ActionResult
    Dim c As New Correspondence With {
     .Id = id
    }
    Return View(c)

Any news on this?

Hi @RowlandShaw ,

Thank you for reporting this, I can confirm it as False Positive. We have similar issue already reported that you can track:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.