Change InvocableHandlerMethod#invokeSuspendingFunction return type

This commits changes the return type from Publisher<?> to
Object in order to avoid potential compatibility issues when
the Reactive Streams dependency is not in the classpath.

Closes gh-30716
This commit is contained in:
Sébastien Deleuze 2023-06-23 14:07:14 +02:00
parent 23ecb50137
commit 81f1edbaf2
1 changed files with 1 additions and 3 deletions

View File

@ -20,8 +20,6 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import org.reactivestreams.Publisher;
import org.springframework.context.MessageSource;
import org.springframework.core.CoroutinesUtils;
import org.springframework.core.DefaultParameterNameDiscoverer;
@ -240,7 +238,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
* instead.
* @since 6.0
*/
protected Publisher<?> invokeSuspendingFunction(Method method, Object target, Object[] args) {
protected Object invokeSuspendingFunction(Method method, Object target, Object[] args) {
return CoroutinesUtils.invokeSuspendingFunction(method, target, args);
}