GH-550 Add support for wrapping value into Message if necessary
Resolves #550
This commit is contained in:
@@ -761,6 +761,10 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
||||
if (rawType instanceof ParameterizedType) {
|
||||
rawType = ((ParameterizedType) rawType).getRawType();
|
||||
}
|
||||
if (value != null && !(value instanceof Message) && FunctionTypeUtils.isMessage(type)) {
|
||||
value = new GenericMessage<>(value);
|
||||
convertedValue = value;
|
||||
}
|
||||
if (value instanceof Message<?>) { // see AWS adapter with Optional payload
|
||||
if (messageNeedsConversion(rawType, (Message<?>) value)) {
|
||||
convertedValue = FunctionTypeUtils.isTypeCollection(type)
|
||||
|
||||
Reference in New Issue
Block a user