@@ -354,7 +354,7 @@ public class MessageHandlingHelper<T extends GeneratedMessageV3> implements Smar
|
|||||||
functionDefinition = (String) headers.get(FunctionProperties.FUNCTION_DEFINITION);
|
functionDefinition = (String) headers.get(FunctionProperties.FUNCTION_DEFINITION);
|
||||||
}
|
}
|
||||||
FunctionInvocationWrapper function = this.functionCatalog.lookup(functionDefinition, "application/json");
|
FunctionInvocationWrapper function = this.functionCatalog.lookup(functionDefinition, "application/json");
|
||||||
Assert.notNull(function, "Failed to lookup function " + funcProperties.getDefinition());
|
Assert.notNull(function, () -> "Failed to lookup function " + funcProperties.getDefinition());
|
||||||
return function;
|
return function;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class FunctionProxyApplicationListener
|
|||||||
String type = (properties.get("type") != null) ? properties.get("type")
|
String type = (properties.get("type") != null) ? properties.get("type")
|
||||||
: "function";
|
: "function";
|
||||||
String lambda = properties.get("lambda");
|
String lambda = properties.get("lambda");
|
||||||
Assert.notNull(lambda, String.format(
|
Assert.notNull(lambda, () -> String.format(
|
||||||
"The 'lambda' property is required for compiling Function: %s",
|
"The 'lambda' property is required for compiling Function: %s",
|
||||||
name));
|
name));
|
||||||
String inputType = properties.get("inputType");
|
String inputType = properties.get("inputType");
|
||||||
|
|||||||
@@ -1050,7 +1050,7 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
|||||||
if (this.isWrapConvertedInputInMessage(convertedInput)) {
|
if (this.isWrapConvertedInputInMessage(convertedInput)) {
|
||||||
convertedInput = MessageBuilder.withPayload(convertedInput).build();
|
convertedInput = MessageBuilder.withPayload(convertedInput).build();
|
||||||
}
|
}
|
||||||
Assert.notNull(convertedInput, "Failed to convert input: " + input + " to " + type);
|
Assert.notNull(convertedInput, () -> "Failed to convert input: " + input + " to " + type);
|
||||||
return convertedInput;
|
return convertedInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user