Skip to content

Commit 9b33b0a

Browse files
committed
Rename CoroutinesUtils#invokeHandlerMethod to invokeSuspendingFunction
1 parent 2b4eb61 commit 9b33b0a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

spring-core/kotlin-coroutines/src/main/kotlin/org/springframework/core/CoroutinesUtils.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ internal fun <T: Any> monoToDeferred(source: Mono<T>) =
5252
GlobalScope.async(Dispatchers.Unconfined) { source.awaitFirstOrNull() }
5353

5454
/**
55-
* Invoke an handler method converting suspending method to [Mono] or
56-
* [reactor.core.publisher.Flux] if necessary.
55+
* Invoke a suspending function converting it to [Mono] or [reactor.core.publisher.Flux]
56+
* if necessary.
5757
*
5858
* @author Sebastien Deleuze
5959
* @since 5.2
6060
*/
6161
@Suppress("UNCHECKED_CAST")
6262
@ExperimentalCoroutinesApi
63-
internal fun invokeHandlerMethod(method: Method, bean: Any, vararg args: Any?): Any? {
63+
internal fun invokeSuspendingFunction(method: Method, bean: Any, vararg args: Any?): Any? {
6464
val function = method.kotlinFunction!!
6565
return if (function.isSuspend) {
6666
val mono = mono(Dispatchers.Unconfined) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public Mono<Object> invoke(Message<?> message, Object... providedArgs) {
131131
Method method = getBridgedMethod();
132132
ReflectionUtils.makeAccessible(method);
133133
if (KotlinDetector.isKotlinReflectPresent() && KotlinDetector.isKotlinType(method.getDeclaringClass())) {
134-
value = CoroutinesUtils.invokeHandlerMethod(method, getBean(), args);
134+
value = CoroutinesUtils.invokeSuspendingFunction(method, getBean(), args);
135135
}
136136
else {
137137
value = method.invoke(getBean(), args);

spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public Mono<HandlerResult> invoke(
140140
ReflectionUtils.makeAccessible(getBridgedMethod());
141141
Method method = getBridgedMethod();
142142
if (KotlinDetector.isKotlinReflectPresent() && KotlinDetector.isKotlinType(method.getDeclaringClass())) {
143-
value = CoroutinesUtils.invokeHandlerMethod(method, getBean(), args);
143+
value = CoroutinesUtils.invokeSuspendingFunction(method, getBean(), args);
144144
}
145145
else {
146146
value = method.invoke(getBean(), args);

0 commit comments

Comments
 (0)