@Async does not support Unit? return type
#31881
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
theme: kotlin
An issue related to Kotlin support
type: bug
A general bug
Milestone
Affects: 6.0.13
When using
@Asyncwith Kotlin functions, it is not possible to useUnit?-returning functions.kotlin.Unitcorresponds tovoidin Java (https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/), but the nullable version is not recognized when submitting the task: https://github.com/spring-projects/spring-framework/blob/main/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java#L295The text was updated successfully, but these errors were encountered: