Skip to content

Commit 1e62d21

Browse files
committed
* Make async implicitly only for suspend fun
1 parent c64d196 commit 1e62d21

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

spring-integration-core/src/main/java/org/springframework/integration/handler/support/MessagingMethodInvokerHelper.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,10 +1025,7 @@ private static boolean isMethodDefinedOnObjectClass(Method method) {
10251025
public boolean isAsync() {
10261026
if (this.handlerMethodsList.size() == 1) {
10271027
Method methodToCheck = this.handlerMethodsList.get(0).values().iterator().next().method;
1028-
return Publisher.class.isAssignableFrom(methodToCheck.getReturnType())
1029-
|| CompletableFuture.class.isAssignableFrom(methodToCheck.getReturnType())
1030-
|| KotlinDetector.isSuspendingFunction(methodToCheck)
1031-
|| ReactiveAdapterRegistry.getSharedInstance().getAdapter(methodToCheck.getReturnType()) != null;
1028+
return KotlinDetector.isSuspendingFunction(methodToCheck);
10321029
}
10331030
return false;
10341031
}

0 commit comments

Comments
 (0)