Skip to content

Commit 2a000c2

Browse files
committed
GH-1310 Add additional log statement explaining fluxification of input
Resolves #1310
1 parent 6f96fc5 commit 2a000c2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/SimpleFunctionRegistry.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,8 @@ private Object fluxifyInputIfNecessary(Object input) {
865865
if ((!treatPayloadAsPlainText && JsonMapper.isJsonStringRepresentsCollection(payload))
866866
&& !FunctionTypeUtils.isTypeCollection(this.inputType)
867867
&& !FunctionTypeUtils.isTypeArray(this.inputType)) {
868+
logger.debug("Actual input represents a collection while input type of the function does not represent a collection. " +
869+
"Therefore framework will attempt invoke function for each element in the collection.");
868870
MessageHeaders headers = input instanceof Message ? ((Message) input).getHeaders() : new MessageHeaders(Collections.emptyMap());
869871
Collection collectionPayload = jsonMapper.fromJson(payload, Collection.class);
870872
Class inputClass = FunctionTypeUtils.getRawType(this.inputType);

0 commit comments

Comments
 (0)