Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 69ff008

Browse files
TylerBrinkleystephentoub
authored andcommitted
Make StringComparer.Create throw ArgumentNullException (#26570)
* Make StringComparer.Create throw ArgumentNullException Throws proper exception. * Update CoreFX.issues.rsp
1 parent 4432a27 commit 69ff008

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/System.Private.CoreLib/shared/System/StringComparer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static StringComparer Create(CultureInfo culture, CompareOptions options)
6161
{
6262
if (culture == null)
6363
{
64-
throw new ArgumentException(nameof(culture));
64+
throw new ArgumentNullException(nameof(culture));
6565
}
6666

6767
return new CultureAwareComparer(culture, options);

tests/CoreFX/CoreFX.issues.rsp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
# Test failure: https://github.com/dotnet/corefx/issues/39223
8181
-nomethod System.ComponentModel.TypeConverterTests.FontConverterTest.TestConvertFrom
8282

83+
# Test failure: https://github.com/dotnet/coreclr/pull/26570
84+
-nomethod System.Tests.StringComparerTests.CreateCultureOptions_InvalidArguments_Throws
85+
8386
# corefx tests need to be updated for changes to GetHashCode
8487
-nomethod System.Numerics.Tests.GenericVectorTests.GetHashCodeInt16
8588
-nomethod System.Numerics.Tests.GenericVectorTests.GetHashCodeInt32

0 commit comments

Comments
 (0)