Merge branch '6.1.x'
# Conflicts: # spring-core/src/main/java/org/springframework/core/CoroutinesUtils.java
This commit is contained in:
@@ -309,9 +309,10 @@ class ChannelSendOperator<T> extends Mono<Void> implements Scannable {
|
||||
}
|
||||
|
||||
private boolean emitCachedSignals() {
|
||||
if (this.error != null) {
|
||||
Throwable error = this.error;
|
||||
if (error != null) {
|
||||
try {
|
||||
requiredWriteSubscriber().onError(this.error);
|
||||
requiredWriteSubscriber().onError(error);
|
||||
}
|
||||
finally {
|
||||
releaseCachedItem();
|
||||
|
||||
@@ -33,7 +33,6 @@ import org.springframework.core.MethodParameter;
|
||||
import org.springframework.core.ParameterNameDiscoverer;
|
||||
import org.springframework.core.ReactiveAdapter;
|
||||
import org.springframework.core.ReactiveAdapterRegistry;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.handler.HandlerMethod;
|
||||
import org.springframework.messaging.handler.invocation.MethodArgumentResolutionException;
|
||||
@@ -153,7 +152,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||
MethodParameter returnType = getReturnType();
|
||||
Class<?> reactiveType = (isSuspendingFunction ? value.getClass() : returnType.getParameterType());
|
||||
ReactiveAdapter adapter = this.reactiveAdapterRegistry.getAdapter(reactiveType);
|
||||
return (isAsyncVoidReturnType(returnType, adapter) ?
|
||||
return (adapter != null && isAsyncVoidReturnType(returnType, adapter) ?
|
||||
Mono.from(adapter.toPublisher(value)) : Mono.justOrEmpty(value));
|
||||
});
|
||||
}
|
||||
@@ -200,8 +199,8 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isAsyncVoidReturnType(MethodParameter returnType, @Nullable ReactiveAdapter reactiveAdapter) {
|
||||
if (reactiveAdapter != null && reactiveAdapter.supportsEmpty()) {
|
||||
private boolean isAsyncVoidReturnType(MethodParameter returnType, ReactiveAdapter reactiveAdapter) {
|
||||
if (reactiveAdapter.supportsEmpty()) {
|
||||
if (reactiveAdapter.isNoValue()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user