GH-475 Fix support for Flux<List> type conversion

At the moment support is rudimentary but given that BeanFactoryAwareFunctionRegistry provides all the necessary type conversion functionality the true fix should consider utilizing it.

Resolves #475
This commit is contained in:
Oleg Zhurakousky
2020-03-31 14:46:22 +02:00
parent 1d784c199d
commit 21d68ff3c8
2 changed files with 15 additions and 1 deletions

View File

@@ -145,7 +145,7 @@ public class RequestProcessor {
Type jsonType = body.startsWith("[")
&& Collection.class.isAssignableFrom(inputType)
|| body.startsWith("{") ? inputType : Collection.class;
if (body.startsWith("[")) {
if (body.startsWith("[") && itemType instanceof Class) {
jsonType = ResolvableType.forClassWithGenerics((Class<?>) jsonType,
(Class<?>) itemType).getType();
}