GH-661 Fix KafkaNull as input type conversion
Basically KafkaNull gets a special treatement where if we see it as Message payload and input type of the function is Message we give it as is and if the input type is POJO then we simply return null Resolves #661
This commit is contained in:
@@ -853,9 +853,8 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
||||
: new OriginalMessageHolder(((Message) input).getPayload(), (Message<?>) input);
|
||||
}
|
||||
else if (input instanceof Message) {
|
||||
if (((Message) input).getPayload().getClass().getName().equals("org.springframework.kafka.support.KafkaNull")
|
||||
&& !this.isInputTypeMessage()) { //TODO rework
|
||||
return ((Message) input).getPayload();
|
||||
if (((Message) input).getPayload().getClass().getName().equals("org.springframework.kafka.support.KafkaNull")) {
|
||||
return FunctionTypeUtils.isMessage(type) ? input : null;
|
||||
}
|
||||
|
||||
if (functionInvocationHelper != null) {
|
||||
|
||||
Reference in New Issue
Block a user