[master] Update dependencies from mono/linker dotnet/arcade (#33646)
authordotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Wed, 18 Mar 2020 01:30:43 +0000 (18:30 -0700)
committerGitHub <noreply@github.com>
Wed, 18 Mar 2020 01:30:43 +0000 (18:30 -0700)
* Update dependencies from https://github.com/dotnet/arcade build 20200316.1

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20166.1
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20166.1
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20166.1
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20166.1
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20166.1
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20166.1
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20166.1
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20166.1
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20166.1
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20166.1
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20166.1
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20166.1
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20166.1
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20166.1

* Update dependencies from https://github.com/dotnet/arcade build 20200316.3

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20166.3
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20166.3
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20166.3
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20166.3
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20166.3
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20166.3
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20166.3
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20166.3
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20166.3
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20166.3
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20166.3
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20166.3
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20166.3
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20166.3

* Fix nullability warnings due to new compiler

* Update dependencies from https://github.com/mono/linker build 20200316.4

- ILLink.Tasks - 0.1.6-prerelease.20166.4

* PR Feedback

* Update dependencies from https://github.com/dotnet/arcade build 20200317.1

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20167.1
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20167.1
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20167.1
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20167.1
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20167.1
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20167.1
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20167.1
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20167.1
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20167.1
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20167.1
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20167.1
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20167.1
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20167.1
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20167.1

* Fix nullability warnings in System.Net.Http

* Use ! instead of pragma warning where we can and fix warning in tests build

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
37 files changed:
eng/Version.Details.xml
eng/Versions.props
eng/common/templates/job/publish-build-assets.yml
eng/common/templates/post-build/common-variables.yml
global.json
src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/SingleQueryOperator.cs
src/libraries/System.Memory/src/System/Buffers/ReadOnlySequence.Helpers.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/AuthenticationHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/BaseHeaderParser.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/CacheControlHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/ContentRangeHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/EntityTagHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/MediaTypeHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/MediaTypeWithQualityHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/NameValueHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/NameValueWithParametersHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/ProductHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/RangeConditionHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/RangeHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/RetryConditionHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/StringWithQualityHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/TransferCodingHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/TransferCodingWithQualityHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/ViaHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/WarningHeaderValue.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/MultiProxy.cs
src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.cs
src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.cs
src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.cs
src/libraries/System.Resources.Extensions/src/System/Resources/Extensions/TypeNameComparer.cs
src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/Converter.cs
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Rfc3161TimestampToken.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/PkcsFormatReader.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.Unescaping.cs
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs

index 2d4e5cd..26e4df5 100644 (file)
@@ -6,61 +6,61 @@
     </Dependency>
   </ProductDependencies>
   <ToolsetDependencies>
-    <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20162.4">
+    <Dependency Name="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.GenFacades" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.GenFacades" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" Version="5.0.0-beta.20162.3">
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" Version="5.0.0-beta.20167.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+      <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
     </Dependency>
     <Dependency Name="optimization.windows_nt-x64.IBC.CoreFx" Version="99.99.99-master-20190716.1">
       <Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Sha>e793fcc19797f407a1b7e98d5f81b04e25a551c3</Sha>
     </Dependency>
-    <Dependency Name="ILLink.Tasks" Version="0.1.6-prerelease.20166.1">
+    <Dependency Name="ILLink.Tasks" Version="0.1.6-prerelease.20166.4">
       <Uri>https://github.com/mono/linker</Uri>
-      <Sha>b6ff22367395cc62130bafcfb7a0023e7c5d6722</Sha>
+      <Sha>eb2b1c6674a1e881e7baa0cb136a978ee3b39f89</Sha>
     </Dependency>
   </ToolsetDependencies>
 </Dependencies>
index 7aef005..ac50220 100644 (file)
   </ItemGroup>
   <PropertyGroup>
     <!-- Arcade dependencies -->
-    <MicrosoftDotNetApiCompatVersion>5.0.0-beta.20162.4</MicrosoftDotNetApiCompatVersion>
-    <MicrosoftDotNetBuildTasksFeedVersion>5.0.0-beta.20162.3</MicrosoftDotNetBuildTasksFeedVersion>
-    <MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20162.3</MicrosoftDotNetCodeAnalysisVersion>
-    <MicrosoftDotNetGenAPIVersion>5.0.0-beta.20162.3</MicrosoftDotNetGenAPIVersion>
-    <MicrosoftDotNetGenFacadesVersion>5.0.0-beta.20162.3</MicrosoftDotNetGenFacadesVersion>
-    <MicrosoftDotNetXUnitExtensionsVersion>5.0.0-beta.20162.3</MicrosoftDotNetXUnitExtensionsVersion>
-    <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.20162.3</MicrosoftDotNetXUnitConsoleRunnerVersion>
-    <MicrosoftDotNetBuildTasksPackagingVersion>5.0.0-beta.20162.3</MicrosoftDotNetBuildTasksPackagingVersion>
-    <MicrosoftDotNetRemoteExecutorVersion>5.0.0-beta.20162.3</MicrosoftDotNetRemoteExecutorVersion>
-    <MicrosoftDotNetVersionToolsTasksVersion>5.0.0-beta.20162.3</MicrosoftDotNetVersionToolsTasksVersion>
+    <MicrosoftDotNetApiCompatVersion>5.0.0-beta.20167.1</MicrosoftDotNetApiCompatVersion>
+    <MicrosoftDotNetBuildTasksFeedVersion>5.0.0-beta.20167.1</MicrosoftDotNetBuildTasksFeedVersion>
+    <MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20167.1</MicrosoftDotNetCodeAnalysisVersion>
+    <MicrosoftDotNetGenAPIVersion>5.0.0-beta.20167.1</MicrosoftDotNetGenAPIVersion>
+    <MicrosoftDotNetGenFacadesVersion>5.0.0-beta.20167.1</MicrosoftDotNetGenFacadesVersion>
+    <MicrosoftDotNetXUnitExtensionsVersion>5.0.0-beta.20167.1</MicrosoftDotNetXUnitExtensionsVersion>
+    <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.20167.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
+    <MicrosoftDotNetBuildTasksPackagingVersion>5.0.0-beta.20167.1</MicrosoftDotNetBuildTasksPackagingVersion>
+    <MicrosoftDotNetRemoteExecutorVersion>5.0.0-beta.20167.1</MicrosoftDotNetRemoteExecutorVersion>
+    <MicrosoftDotNetVersionToolsTasksVersion>5.0.0-beta.20167.1</MicrosoftDotNetVersionToolsTasksVersion>
     <!-- Installer dependencies -->
     <MicrosoftNETCoreAppVersion>5.0.0-alpha.1.20080.9</MicrosoftNETCoreAppVersion>
     <MicrosoftNETCoreDotNetHostVersion>5.0.0-alpha.1.20080.9</MicrosoftNETCoreDotNetHostVersion>
     <!-- Docs -->
     <MicrosoftPrivateIntellisenseVersion>3.1.0-preview-20200129.1</MicrosoftPrivateIntellisenseVersion>
     <!-- ILLink -->
-    <ILLinkTasksVersion>0.1.6-prerelease.20166.1</ILLinkTasksVersion>
+    <ILLinkTasksVersion>0.1.6-prerelease.20166.4</ILLinkTasksVersion>
     <!-- Mono LLVM -->
     <runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>6.0.1-alpha.1.20166.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
     <runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>6.0.1-alpha.1.20166.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
index b722975..055304a 100644 (file)
@@ -37,6 +37,12 @@ jobs:
     - name: _BuildConfig
       value: ${{ parameters.configuration }}
     - group: Publish-Build-Assets
+    # Skip component governance and codesign validation for SDL. These jobs
+    # create no content.
+    - name: skipComponentGovernanceDetection
+      value: true
+    - name: runCodesignValidationInjection
+      value: false
 
   steps:
   - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
index 9505cf1..61488fd 100644 (file)
@@ -90,3 +90,10 @@ variables:
     value: https://dotnetclimsrc.blob.core.windows.net/dotnet/index.json
   - name: InternalInstallersBlobFeedKey
     value: $(dotnetclimsrc-access-key)
+
+  # Skip component governance and codesign validation for SDL. These jobs
+  # create no content.
+  - name: skipComponentGovernanceDetection
+    value: true
+  - name: runCodesignValidationInjection
+    value: false
\ No newline at end of file
index 6d71700..606ef2f 100644 (file)
     "python": "2.7.15"
   },
   "msbuild-sdks": {
-    "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20162.3",
-    "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20162.3",
-    "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20162.3",
-    "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20162.3",
+    "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20167.1",
+    "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20167.1",
+    "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20167.1",
+    "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20167.1",
     "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0",
     "Microsoft.NET.Sdk.IL": "5.0.0-alpha.1.20076.2",
     "Microsoft.Build.NoTargets": "1.0.53",
index 519b6e2..d1b30d9 100644 (file)
@@ -123,7 +123,7 @@ namespace System.Linq.Parallel
             // Straightforward IEnumerator<T> methods.
             //
 
-            internal override bool MoveNext([MaybeNullWhen(false), AllowNull] ref TSource currentElement, ref int currentKey)
+            internal override bool MoveNext([AllowNull] ref TSource currentElement, ref int currentKey)
             {
                 Debug.Assert(_source != null);
 
index 56afdd3..7ba580d 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using Internal.Runtime.CompilerServices;
@@ -517,7 +518,7 @@ namespace System.Buffers
             return endIndex - startIndex;
         }
 
-        internal bool TryGetReadOnlySequenceSegment(out ReadOnlySequenceSegment<T>? startSegment, out int startIndex, out ReadOnlySequenceSegment<T>? endSegment, out int endIndex)
+        internal bool TryGetReadOnlySequenceSegment([NotNullWhen(true)] out ReadOnlySequenceSegment<T>? startSegment, out int startIndex, [NotNullWhen(true)] out ReadOnlySequenceSegment<T>? endSegment, out int endIndex)
         {
             object? startObject = _startObject;
 
@@ -555,7 +556,7 @@ namespace System.Buffers
             return true;
         }
 
-        internal bool TryGetString(out string? text, out int start, out int length)
+        internal bool TryGetString([NotNullWhen(true)] out string? text, out int start, out int length)
         {
             if (typeof(T) != typeof(char) || GetSequenceType() != SequenceType.String)
             {
index 4959ac9..069e59c 100644 (file)
@@ -111,7 +111,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.SingleValueAuthenticationParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (AuthenticationHeaderValue)output;
+                parsedValue = (AuthenticationHeaderValue)output!;
                 return true;
             }
             return false;
index ea0a5cc..f3d9ef5 100644 (file)
@@ -25,8 +25,10 @@ namespace System.Net.Http.Headers
         protected abstract int GetParsedValueLength(string value, int startIndex, object? storeValue,
             out object? parsedValue);
 
+#pragma warning disable CS8765 // Doesn't match overriden member nullable attribute on out parameter
         public sealed override bool TryParseValue(string? value, object? storeValue, ref int index,
-            [NotNullWhen(true)] out object? parsedValue)
+            out object? parsedValue)
+#pragma warning restore CS8765
         {
             parsedValue = null;
 
index fee7d4a..e73adeb 100644 (file)
@@ -405,14 +405,14 @@ namespace System.Net.Http.Headers
             return (CacheControlHeaderValue)CacheControlHeaderParser.Parser.ParseValue(input, null, ref index);
         }
 
-        public static bool TryParse(string? input, [NotNullWhen(true)] out CacheControlHeaderValue? parsedValue)
+        public static bool TryParse(string? input, out CacheControlHeaderValue? parsedValue)
         {
             int index = 0;
             parsedValue = null;
 
             if (CacheControlHeaderParser.Parser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (CacheControlHeaderValue)output;
+                parsedValue = (CacheControlHeaderValue?)output;
                 return true;
             }
             return false;
index 06b19e7..f52e660 100644 (file)
@@ -216,7 +216,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.ContentDispositionParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (ContentDispositionHeaderValue)output;
+                parsedValue = (ContentDispositionHeaderValue)output!;
                 return true;
             }
             return false;
index 6fa9a53..ecb3f51 100644 (file)
@@ -194,7 +194,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.ContentRangeParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (ContentRangeHeaderValue)output;
+                parsedValue = (ContentRangeHeaderValue)output!;
                 return true;
             }
             return false;
index dcf1837..46abb6a 100644 (file)
@@ -116,7 +116,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.SingleValueEntityTagParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (EntityTagHeaderValue)output;
+                parsedValue = (EntityTagHeaderValue)output!;
                 return true;
             }
             return false;
index fbb73ec..260e302 100644 (file)
@@ -144,7 +144,7 @@ namespace System.Net.Http.Headers
 
             if (MediaTypeHeaderParser.SingleValueParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (MediaTypeHeaderValue)output;
+                parsedValue = (MediaTypeHeaderValue)output!;
                 return true;
             }
             return false;
index ad8c6c2..c5d6aeb 100644 (file)
@@ -57,7 +57,7 @@ namespace System.Net.Http.Headers
 
             if (MediaTypeHeaderParser.SingleValueWithQualityParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (MediaTypeWithQualityHeaderValue)output;
+                parsedValue = (MediaTypeWithQualityHeaderValue)output!;
                 return true;
             }
             return false;
index 12aa888..098576e 100644 (file)
@@ -129,7 +129,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.SingleValueNameValueParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (NameValueHeaderValue)output;
+                parsedValue = (NameValueHeaderValue)output!;
                 return true;
             }
             return false;
index b4116e6..e7f58ea 100644 (file)
@@ -103,7 +103,7 @@ namespace System.Net.Http.Headers
             if (GenericHeaderParser.SingleValueNameValueWithParametersParser.TryParseValue(input,
                 null, ref index, out object? output))
             {
-                parsedValue = (NameValueWithParametersHeaderValue)output;
+                parsedValue = (NameValueWithParametersHeaderValue)output!;
                 return true;
             }
             return false;
index 3f59898..ac3a6b5 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 
 namespace System.Net.Http.Headers
 {
@@ -92,14 +93,14 @@ namespace System.Net.Http.Headers
             return (ProductHeaderValue)GenericHeaderParser.SingleValueProductParser.ParseValue(input, null, ref index);
         }
 
-        public static bool TryParse(string? input, out ProductHeaderValue? parsedValue)
+        public static bool TryParse(string? input, [NotNullWhen(true)] out ProductHeaderValue? parsedValue)
         {
             int index = 0;
             parsedValue = null;
 
             if (GenericHeaderParser.SingleValueProductParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (ProductHeaderValue)output;
+                parsedValue = (ProductHeaderValue)output!;
                 return true;
             }
             return false;
index 21c8768..039cab1 100644 (file)
@@ -107,7 +107,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.RangeConditionParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (RangeConditionHeaderValue)output;
+                parsedValue = (RangeConditionHeaderValue)output!;
                 return true;
             }
             return false;
index 1e3a44e..b952875 100644 (file)
@@ -133,7 +133,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.RangeParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (RangeHeaderValue)output;
+                parsedValue = (RangeHeaderValue)output!;
                 return true;
             }
             return false;
index 26152f3..02b0850 100644 (file)
@@ -104,7 +104,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.RetryConditionParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (RetryConditionHeaderValue)output;
+                parsedValue = (RetryConditionHeaderValue)output!;
                 return true;
             }
             return false;
index fc516ee..60c0e66 100644 (file)
@@ -119,7 +119,7 @@ namespace System.Net.Http.Headers
             if (GenericHeaderParser.SingleValueStringWithQualityParser.TryParseValue(
                 input, null, ref index, out object? output))
             {
-                parsedValue = (StringWithQualityHeaderValue)output;
+                parsedValue = (StringWithQualityHeaderValue)output!;
                 return true;
             }
             return false;
index a11cb4a..22daaea 100644 (file)
@@ -72,7 +72,7 @@ namespace System.Net.Http.Headers
 
             if (TransferCodingHeaderParser.SingleValueParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (TransferCodingHeaderValue)output;
+                parsedValue = (TransferCodingHeaderValue)output!;
                 return true;
             }
             return false;
index f4fd075..6b47810 100644 (file)
@@ -57,7 +57,7 @@ namespace System.Net.Http.Headers
             if (TransferCodingHeaderParser.SingleValueWithQualityParser.TryParseValue(
                 input, null, ref index, out object? output))
             {
-                parsedValue = (TransferCodingWithQualityHeaderValue)output;
+                parsedValue = (TransferCodingWithQualityHeaderValue)output!;
                 return true;
             }
             return false;
index 24cbbb9..7aaef31 100644 (file)
@@ -152,7 +152,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.SingleValueViaParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (ViaHeaderValue)output;
+                parsedValue = (ViaHeaderValue)output!;
                 return true;
             }
             return false;
index 0b4439f..9572c06 100644 (file)
@@ -150,7 +150,7 @@ namespace System.Net.Http.Headers
 
             if (GenericHeaderParser.SingleValueWarningParser.TryParseValue(input, null, ref index, out object? output))
             {
-                parsedValue = (WarningHeaderValue)output;
+                parsedValue = (WarningHeaderValue)output!;
                 return true;
             }
             return false;
index ad9a4ba..61f59a3 100644 (file)
@@ -799,7 +799,7 @@ namespace System.Net.Http
 
                 while (AltSvcHeaderParser.Parser.TryParseValue(altSvcHeaderValue, null, ref parseIdx, out object? parsedValue))
                 {
-                    var value = (AltSvcHeaderValue)parsedValue;
+                    var value = (AltSvcHeaderValue?)parsedValue;
 
                     // 'clear' should be the only value present.
                     if (value == AltSvcHeaderValue.Clear)
@@ -810,7 +810,7 @@ namespace System.Net.Http
                         break;
                     }
 
-                    if (nextAuthority == null && value.AlpnProtocolName == "h3")
+                    if (nextAuthority == null && value != null && value.AlpnProtocolName == "h3")
                     {
                         var authority = new HttpAuthority(value.Host!, value.Port);
 
index 3ffc877..7c2131c 100644 (file)
@@ -171,12 +171,13 @@ namespace System.Net.Http
             Debug.Assert(_proxyConfig != null);
             if (_currentIndex < _proxyConfig.Length)
             {
-                bool hasProxy = TryParseProxyConfigPart(_proxyConfig.AsSpan(_currentIndex), _secure, out uri, out int charactersConsumed);
+                bool hasProxy = TryParseProxyConfigPart(_proxyConfig.AsSpan(_currentIndex), _secure, out uri!, out int charactersConsumed);
 
                 _currentIndex += charactersConsumed;
                 Debug.Assert(_currentIndex <= _proxyConfig.Length);
 
                 isFinalProxy = _currentIndex == _proxyConfig.Length;
+
                 return hasProxy;
             }
 
index 4a2f9c7..e3c0a66 100644 (file)
@@ -44,9 +44,7 @@ namespace System.Threading
             }
         }
 
-        public static bool TryOpenExisting(string name, [NotNullWhen(true)] out EventWaitHandle? result)
-        {
-            return OpenExistingWorker(name, out result) == OpenExistingResult.Success;
-        }
+        public static bool TryOpenExisting(string name, [NotNullWhen(true)] out EventWaitHandle? result) =>
+            OpenExistingWorker(name, out result!) == OpenExistingResult.Success;
     }
 }
index 1effbc6..2f4756d 100644 (file)
@@ -57,6 +57,6 @@ namespace System.Threading
         }
 
         public static bool TryOpenExisting(string name, [NotNullWhen(true)] out Mutex? result) =>
-            OpenExistingWorker(name, out result) == OpenExistingResult.Success;
+            OpenExistingWorker(name, out result!) == OpenExistingResult.Success;
     }
 }
index a9ed317..5a6a586 100644 (file)
@@ -50,7 +50,7 @@ namespace System.Threading
         }
 
         public static bool TryOpenExisting(string name, [NotNullWhen(true)] out Semaphore? result) =>
-            OpenExistingWorker(name, out result) == OpenExistingResult.Success;
+            OpenExistingWorker(name, out result!) == OpenExistingResult.Success;
 
         public int Release() => ReleaseCore(1);
 
index 64191f6..82b1949 100644 (file)
@@ -53,7 +53,9 @@ namespace System.Resources.Extensions
         // Compare two type names ignoring version
         // If a type name is missing assembly, we assume it came from mscorlib
         // since this is what Type.GetType will do.
+#pragma warning disable CS8767 // This API member has [AllowNull] implemented interface, but we don't want to accept nulls here.
         public bool Equals(string assemblyQualifiedTypeName1, string assemblyQualifiedTypeName2)
+#pragma warning restore CS8767
         {
             if (assemblyQualifiedTypeName1 == null)
                 throw new ArgumentNullException(nameof(assemblyQualifiedTypeName1));
index 86bd727..5bab39b 100644 (file)
@@ -204,8 +204,6 @@ namespace System.Runtime.Serialization.Formatters.Binary
 
         internal static bool IsPrimitiveArray(Type? type, [NotNullWhen(true)] out object? typeInformation)
         {
-            bool bIsPrimitive = true;
-
             if (ReferenceEquals(type, s_typeofBooleanArray)) typeInformation = InternalPrimitiveTypeE.Boolean;
             else if (ReferenceEquals(type, s_typeofByteArray)) typeInformation = InternalPrimitiveTypeE.Byte;
             else if (ReferenceEquals(type, s_typeofCharArray)) typeInformation = InternalPrimitiveTypeE.Char;
@@ -221,10 +219,10 @@ namespace System.Runtime.Serialization.Formatters.Binary
             else
             {
                 typeInformation = null;
-                bIsPrimitive = false;
+                return false;
             }
 
-            return bIsPrimitive;
+            return true;
         }
 
         private static void InitValueA()
index d431a2b..958308b 100644 (file)
@@ -86,14 +86,13 @@ namespace System.Security.Cryptography.Pkcs
                 return false;
             }
 
-            bool ret = VerifyData(data);
-
-            if (ret)
+            if (VerifyData(data))
             {
                 signerCertificate = cert;
+                return true;
             }
 
-            return ret;
+            return false;
         }
 
         public bool VerifySignatureForHash(
@@ -111,14 +110,13 @@ namespace System.Security.Cryptography.Pkcs
                 return false;
             }
 
-            bool ret = VerifyHash(hash, PkcsHelpers.GetOidFromHashAlgorithm(hashAlgorithm));
-
-            if (ret)
+            if (VerifyHash(hash, PkcsHelpers.GetOidFromHashAlgorithm(hashAlgorithm)))
             {
                 signerCertificate = cert;
+                return true;
             }
 
-            return ret;
+            return false;
         }
 
         public bool VerifySignatureForHash(
@@ -141,18 +139,17 @@ namespace System.Security.Cryptography.Pkcs
                 return false;
             }
 
-            bool ret = VerifyHash(hash, hashAlgorithmId.Value);
-
-            if (ret)
+            if (VerifyHash(hash, hashAlgorithmId.Value))
             {
                 // REVIEW: Should this return the cert, or new X509Certificate2(cert.RawData)?
                 // SignedCms.SignerInfos builds new objects each call, which makes
                 // ReferenceEquals(cms.SignerInfos[0].Certificate, cms.SignerInfos[0].Certificate) be false.
                 // So maybe it's weird to give back a cert we've copied from that?
                 signerCertificate = cert;
+                return true;
             }
 
-            return ret;
+            return false;
         }
 
         public bool VerifySignatureForSignerInfo(
index 2d42852..cca2ef9 100644 (file)
@@ -109,7 +109,7 @@ namespace Internal.Cryptography.Pal
         private static bool TryReadPkcs7Der(
             byte[] rawData,
             bool single,
-            [NotNullWhen(true)] out ICertificatePal? certPal,
+            out ICertificatePal? certPal,
             [NotNullWhen(true)] out List<ICertificatePal>? certPals)
         {
             using (SafePkcs7Handle pkcs7 = Interop.Crypto.DecodePkcs7(rawData, rawData.Length))
@@ -217,7 +217,7 @@ namespace Internal.Cryptography.Pal
             SafePkcs7Handle pkcs7,
             bool single,
             out ICertificatePal? certPal,
-            out List<ICertificatePal> certPals)
+            [NotNullWhen(true)] out List<ICertificatePal> certPals)
         {
             List<ICertificatePal>? readPals = single ? null : new List<ICertificatePal>();
 
@@ -237,7 +237,7 @@ namespace Internal.Cryptography.Pal
                     throw new CryptographicException(SR.Cryptography_X509_PKCS7_NoSigner);
                 }
 
-                Debug.Assert(readPals != null); // null iff single == true
+                Debug.Assert(readPals != null); // null if single == true
 
                 for (int i = 0; i < count; i++)
                 {
@@ -274,7 +274,7 @@ namespace Internal.Cryptography.Pal
             bool single,
             out ICertificatePal? readPal,
             out List<ICertificatePal>? readCerts,
-            [NotNullWhen(false)] out Exception? openSslException)
+            out Exception? openSslException)
         {
             // DER-PKCS12
             OpenSslPkcs12Reader? pfx;
index 0f0c771..62c0410 100644 (file)
@@ -25,14 +25,13 @@ namespace System.Text.Json
             utf8Unescaped = utf8Unescaped.Slice(0, written);
             Debug.Assert(!utf8Unescaped.IsEmpty);
 
-            bool result = TryDecodeBase64InPlace(utf8Unescaped, out bytes);
+            bool result = TryDecodeBase64InPlace(utf8Unescaped, out bytes!);
 
             if (unescapedArray != null)
             {
                 utf8Unescaped.Clear();
                 ArrayPool<byte>.Shared.Return(unescapedArray);
             }
-
             return result;
         }
 
index 0bd354c..450b871 100644 (file)
@@ -75,7 +75,7 @@ namespace System.Text.Json.Serialization
         }
 
         // Provide a default implementation for value converters.
-        internal virtual bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, ref ReadStack state, out T value)
+        internal virtual bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, ref ReadStack state, [MaybeNullWhen(false)] out T value)
         {
             value = Read(ref reader, typeToConvert, options);
             return true;