Added initial implementation of check for supported function signatures
This commit is contained in:
@@ -147,6 +147,7 @@ public class FunctionRegistration<T> implements BeanNameAware {
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public <S> FunctionRegistration<S> wrap() {
|
||||
this.isFunctionSignatureSupported();
|
||||
FunctionRegistration<S> result;
|
||||
if (this.type == null) {
|
||||
result = (FunctionRegistration<S>) this;
|
||||
@@ -192,4 +193,12 @@ public class FunctionRegistration<T> implements BeanNameAware {
|
||||
}
|
||||
}
|
||||
|
||||
private void isFunctionSignatureSupported() {
|
||||
if (type != null) {
|
||||
Assert.isTrue(!(Mono.class.isAssignableFrom(this.type.getOutputWrapper())
|
||||
&& Mono.class.isAssignableFrom(this.type.getInputWrapper())),
|
||||
"Function<Mono, Mono> is not supported.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user