Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
adhesivee merged 17 commits into myndocs:develop from YektaDev:develop
Jun 22, 2021

Conversation

@YektaDev
Copy link
Contributor

@YektaDev YektaDev commented Jun 15, 2021

No description provided.

Copy link
Collaborator

Can one of the admins verify this patch?

YektaDev reacted with thumbs up emoji

Copy link
Contributor Author

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.

adhesivee reacted with thumbs up emoji

Copy link
Contributor Author

Are there any issues?

val authorizedGrantType = AuthorizedGrantType.AUTHORIZATION_CODE
if (!clientOf.authorizedGrantTypes.contains(authorizedGrantType)) {
throw InvalidGrantException("Authorize not allowed: '$authorizedGrantType'")
with(AuthorizedGrantType.AUTHORIZATION_CODE) {
Copy link
Collaborator

@adhesivee adhesivee Jun 21, 2021

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

Copy link
Contributor Author

@YektaDev YektaDev Jun 22, 2021
edited
Loading

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.

adhesivee reacted with thumbs up emoji
Copy link
Collaborator

@YektaDev Needed to find some time to do the review.
One remark, not a big point. Would be nice if you can explain it.

YektaDev reacted with thumbs up emoji

@adhesivee adhesivee merged commit b3ff7f2 into myndocs:develop Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adhesivee adhesivee adhesivee approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /