Skip to content

Commit 59ea0aa

Browse files
committed
GH-1310 Add additional log statement explaining fluxification of input
Resolves #1310
1 parent 9fe4ede commit 59ea0aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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
@@ -858,6 +858,8 @@ private Object fluxifyInputIfNecessary(Object input) {
858858
if ((!treatPayloadAsPlainText && JsonMapper.isJsonStringRepresentsCollection(payload))
859859
&& !FunctionTypeUtils.isTypeCollection(this.inputType)
860860
&& !FunctionTypeUtils.isTypeArray(this.inputType)) {
861+
logger.debug("Actual input represents a collection while input type of the function does not represent a collection. " +
862+
"Therefore framework will attempt invoke function for each element in the collection.");
861863
MessageHeaders headers = input instanceof Message ? ((Message) input).getHeaders() : new MessageHeaders(Collections.emptyMap());
862864
Collection collectionPayload = jsonMapper.fromJson(payload, Collection.class);
863865
Class inputClass = FunctionTypeUtils.getRawType(this.inputType);

0 commit comments

Comments
 (0)