-
Notifications
You must be signed in to change notification settings - Fork 924
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
Update FlowResponseConverterFunctionProvider
Type Extension functions toClass()
#5201
Conversation
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.
Looks good to me. 👍
By the way, could you write the commit description in English so that others can read it as well?
ChatGPT might help you. 😉
I did |
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.
Thanks @esperar for the cleanup 👍
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.
Looks nicer! ❤️
Thanks a lot, @esperar! 😄 |
Type of PR
Hello! While reviewing the Kotlin part of Armeria, I noticed that in the
FlowResponseConverterFunctionProvider
class, there's an extension function forType
used in thecreateResponseConverterFunction()
function ofDelegatingResponseConverterFunctionProvider
. ThetoClass()
function returns a type ofClass<*>?
.In the past, when working with Kotlin, I found it beneficial to define extension functions that return nullable values with names following the
toXXXOrNull()
pattern. This made the code more understandable for me and my teammates, especially during maintenance.Since the extension function is defined just below
createResponseConverterFunction()
, it may lead to questions like "Why usetoClass()?.let
here?" AddingOrNull
to the function name can make the code more readable.