Nullability refinements and related polishing

This commit is contained in:
Juergen Hoeller
2020-10-13 00:08:15 +02:00
parent 1b63c31722
commit 7f365942a5
7 changed files with 37 additions and 15 deletions

View File

@@ -77,14 +77,13 @@ public abstract class KotlinDetector {
/**
* Return {@code true} if the method is a suspending function.
*
* @author Sebastien Deleuze
* @since 5.3
*/
public static boolean isSuspendingFunction(Method method) {
if (KotlinDetector.isKotlinType(method.getDeclaringClass())) {
Class<?>[] types = method.getParameterTypes();
if ((types.length > 0) && "kotlin.coroutines.Continuation".equals(types[types.length - 1].getName())) {
if (types.length > 0 && "kotlin.coroutines.Continuation".equals(types[types.length - 1].getName())) {
return true;
}
}