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

Get rid of unnecessary .let, use MediaType #972

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

kilink
Copy link
Member

@kilink kilink commented Apr 10, 2022

Get rid of unnecessary .let calls where the varaible was already smart cast or known to not be null. Also, switch to MediaType class for request content type check.

@kilink kilink requested a review from berngp April 11, 2022 16:57
@@ -71,6 +72,11 @@ open class DgsRestController(
open val mapper: ObjectMapper = jacksonObjectMapper()
) {

companion object {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the Kotlin convention to put the companion object at the bottom?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I guess it is, according to this; guess it just feels weird to me to put constants / loggers at the end of a class.

@berngp berngp force-pushed the dgs-rest-controller-cleanup branch 2 times, most recently from 66ed918 to 2f571fe Compare April 11, 2022 20:25
Get rid of unnecessary .let calls where the varaible was already smart
cast or known to not be null. Also, switch to MediaType class for
request content type check.
@berngp berngp force-pushed the dgs-rest-controller-cleanup branch from 2f571fe to 49b76e1 Compare April 11, 2022 22:15
@berngp berngp merged commit 580d741 into master Apr 11, 2022
@berngp berngp deleted the dgs-rest-controller-cleanup branch April 11, 2022 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants