-
Notifications
You must be signed in to change notification settings - Fork 65
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
Issue #70 - Detect kotlin coroutine calls. #84
Conversation
57ef10a
to
506d03c
Compare
} else { | ||
// last argument | ||
final String[] argumentNames = context.getArgumentNames(); | ||
final MutableArgumentValue<?> argument = context.getParameters().get(argumentNames[argumentNames.length - 1]); |
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.
context.getParameters()
is relatively expensive, and you don't need the MutableArgument
value for these case. Use getParameterValues()[argumentNames.length - 1]
instead which will provide better performance
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.
Done
return result; | ||
} | ||
|
||
private static boolean isKotlinContinuation(MethodInvocationContext<Object, Object> context) { |
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 believe for this you can just call context.getExecutableMethod().isSuspend()
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.
Done
Couple of changes, thanks for the contribution! |
Are we sure that the last argument will always be of type |
Thanks for the contribution! |
No description provided.