Skip to content

Commit 8eb660b

Browse files
committed
Merge branch '5.3.x'
2 parents bc3b3d0 + c55606e commit 8eb660b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/reactive/InvocableHandlerMethod.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,16 @@ private boolean isAsyncVoidReturnType(MethodParameter returnType, @Nullable Reac
205205
if (reactiveAdapter.isNoValue()) {
206206
return true;
207207
}
208-
Type parameterType = returnType.getGenericParameterType();
209-
if (parameterType instanceof ParameterizedType type) {
210-
if (type.getActualTypeArguments().length == 1) {
211-
return Void.class.equals(type.getActualTypeArguments()[0]);
212-
}
208+
}
209+
Type parameterType = returnType.getGenericParameterType();
210+
if (parameterType instanceof ParameterizedType type) {
211+
if (type.getActualTypeArguments().length == 1) {
212+
return Void.class.equals(type.getActualTypeArguments()[0]);
213213
}
214214
}
215-
return false;
215+
Method method = returnType.getMethod();
216+
return method != null && KotlinDetector.isSuspendingFunction(method) &&
217+
Void.TYPE.equals(returnType.getParameterType());
216218
}
217219

218220
}

0 commit comments

Comments
 (0)