Skip to content

Commit 0bffc80

Browse files
authored
Use ArgumentNullException instead null coalescing (#51732)
1 parent ce330d9 commit 0bffc80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Components/Authorization/src/AuthenticationState.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public class AuthenticationState
1616
/// <param name="user">A <see cref="ClaimsPrincipal"/> representing the user.</param>
1717
public AuthenticationState(ClaimsPrincipal user)
1818
{
19-
User = user ?? throw new ArgumentNullException(nameof(user));
19+
ArgumentNullException.ThrowIfNull(user);
20+
User = user;
2021
}
2122

2223
/// <summary>

0 commit comments

Comments
 (0)