Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor null checks with 'is not null' in JwtBuilder #484

Merged
merged 2 commits into from
Jan 21, 2024

Conversation

mmfazrin-phcc-gov
Copy link
Contributor

@mmfazrin-phcc-gov mmfazrin-phcc-gov commented Oct 30, 2023

To better follow the naming convention and improve code readability, the null checks in JwtBuilder.cs have been updated from is object to is not null.

@abatishchev
Copy link
Member

Great suggestion! I was a bit lazy to do this myself :) Do you mind making the change to all files across the repo?

@mmfazrin-phcc-gov
Copy link
Contributor Author

Ok I will try to do it

@abatishchev
Copy link
Member

@mmfazrin-phcc-gov ping please. your help would be appreciated!

To better follow the naming convention and improve code readability, the null checks in JwtBuilder.cs have been updated from 'is object' to 'is not null'. The updated null checks include the variables '_algorithm', '_algFactory', '_validator', '_jsonSerializerFactory', '_urlEncoder', and '_jwt.Payload'.
The code has been revised to use the 'is not null' pattern for null checks throughout multiple files. This change enhances the code readability and uniformity, providing a more modern way to handle null checks.
@mmfazrin-phcc-gov
Copy link
Contributor Author

mmfazrin-phcc-gov commented Jan 21, 2024

@mmfazrin-phcc-gov ping please. your help would be appreciated!

Hi, Sorry totally forgot due to the December vacation, updated the code

@abatishchev abatishchev merged commit 17f732a into jwt-dotnet:main Jan 21, 2024
1 check passed
@abatishchev
Copy link
Member

Awesome, thanks for the contribution!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants