Browse Source

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
pull/30724/head
Sébastien Deleuze 3 years ago
parent
commit
81f1edbaf2
  1. 4
      spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java

4
spring-web/src/main/java/org/springframework/web/method/support/InvocableHandlerMethod.java

@ -20,8 +20,6 @@ import java.lang.reflect.InvocationTargetException; @@ -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 { @@ -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);
}

Loading…
Cancel
Save