Don't call user operator for null check of HttpMethod value (#40306)
authorMarek Safar <marek.safar@gmail.com>
Mon, 10 Aug 2020 22:34:31 +0000 (00:34 +0200)
committerGitHub <noreply@github.com>
Mon, 10 Aug 2020 22:34:31 +0000 (15:34 -0700)
src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestMessage.cs

index 83ee09f..5e1d9bb 100644 (file)
@@ -167,7 +167,7 @@ namespace System.Net.Http
         [MemberNotNull(nameof(_version))]
         private void InitializeValues(HttpMethod method, Uri? requestUri)
         {
-            if (method == null)
+            if (method is null)
             {
                 throw new ArgumentNullException(nameof(method));
             }