Skip to content

Conversation

@badrshs
Copy link
Contributor

@badrshs badrshs commented Jan 24, 2021

  • [x ] You've read the Contributor Guide and Code of Conduct.
  • [x ] You've included unit or integration tests for your change, where applicable.
  • [x ] You've included inline docs for your change, where applicable.

PR Title
removed unnecessary null check in SignInManager

PR Description
removed unnecessary null check, we already throwing an exception when principal is null.

the old code was

 if (principal == null)
            {
                throw new ArgumentNullException(nameof(principal));
            }

then

return principal?.Identities != null

so?is not necessary at that line.

@ghost ghost added the area-identity Includes: Identity and providers label Jan 24, 2021
@badrshs badrshs force-pushed the badrshs/remove-unnecessary-null-check branch from 655881a to ee26985 Compare January 24, 2021 22:00
@pranavkm pranavkm merged commit fdc8822 into dotnet:main Jan 25, 2021
@pranavkm pranavkm added this to the 6.0-preview1 milestone Jan 25, 2021
@badrshs badrshs deleted the badrshs/remove-unnecessary-null-check branch January 25, 2021 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-identity Includes: Identity and providers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants