Merge pull request #763 from GreenRover/main

Performance improvements
This commit is contained in:
Oleg Zhurakousky
2021-11-08 11:14:21 +01:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -354,7 +354,7 @@ public class MessageHandlingHelper<T extends GeneratedMessageV3> implements Smar
functionDefinition = (String) headers.get(FunctionProperties.FUNCTION_DEFINITION);
}
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;
}
}

View File

@@ -92,7 +92,7 @@ public class FunctionProxyApplicationListener
String type = (properties.get("type") != null) ? properties.get("type")
: "function";
String lambda = properties.get("lambda");
Assert.notNull(lambda, String.format(
Assert.notNull(lambda, () -> String.format(
"The 'lambda' property is required for compiling Function: %s",
name));
String inputType = properties.get("inputType");

View File

@@ -1050,7 +1050,7 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
if (this.isWrapConvertedInputInMessage(convertedInput)) {
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;
}