Skip to content

Commit

Permalink
SLVS-1603 Fix S2955 Reliability issue on FilePathAndContent.cs (#5806)
Browse files Browse the repository at this point in the history
  • Loading branch information
vnaskos-sonar authored Nov 7, 2024
1 parent cba74c7 commit d440299
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ConnectedMode/Binding/FilePathAndContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

using System;

namespace SonarLint.VisualStudio.ConnectedMode.Binding
{
public class FilePathAndContent<T>
Expand All @@ -34,7 +32,7 @@ public FilePathAndContent(string path, T content)
throw new ArgumentNullException(nameof(path));
}

if (content == null)
if (Equals(content, default(T)))
{
throw new ArgumentNullException(nameof(content));
}
Expand Down

0 comments on commit d440299

Please sign in to comment.