-
Notifications
You must be signed in to change notification settings - Fork 25
Simplifications and cleaning up unused imports #84
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
Conversation
Can one of the admins verify this patch? |
I haven't made any logical changes; except for one function whose return type was unnecessarily nullable and now is non-nullable. Every other change is just optimization, simplification, or fixing indent. |
Are there any issues? |
val authorizedGrantType = AuthorizedGrantType.AUTHORIZATION_CODE | ||
if (!clientOf.authorizedGrantTypes.contains(authorizedGrantType)) { | ||
throw InvalidGrantException("Authorize not allowed: '$authorizedGrantType'") | ||
with(AuthorizedGrantType.AUTHORIZATION_CODE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, I don't see what with
provides more then previous solution?
It requires extra level of nesting, and instead of assigning it to a named variable, it is now assigned to this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this extra level of nesting would be clearer than introducing a new variable that will be used only once. The nested block isn't big enough though. So, I guess it's between the gap of noisy and clean code, or it's just a matter of preference.
@YektaDev Needed to find some time to do the review. |
No description provided.