GH-608 Additional fix based on provided failed test
This commit is contained in:
@@ -822,14 +822,7 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
|||||||
boolean convertWithHint = false;
|
boolean convertWithHint = false;
|
||||||
Type hint = FunctionTypeUtils.getGenericType(type);
|
Type hint = FunctionTypeUtils.getGenericType(type);
|
||||||
|
|
||||||
convertWithHint = this.useConversionHint(type, rawType);
|
convertWithHint = this.useConversionHint(type, rawType, hint);
|
||||||
|
|
||||||
// if (FunctionTypeUtils.isTypeCollection(type)) {
|
|
||||||
// convertWithHint = true;
|
|
||||||
// }
|
|
||||||
// else if (!FunctionTypeUtils.isPublisher(type) && !rawType.equals(type) && !FunctionTypeUtils.isMessage(type)) {
|
|
||||||
// convertWithHint = true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
convertedValue = convertWithHint
|
convertedValue = convertWithHint
|
||||||
? this.fromMessage((Message<?>) value, (Class<?>) rawType, hint)
|
? this.fromMessage((Message<?>) value, (Class<?>) rawType, hint)
|
||||||
@@ -867,8 +860,11 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
|||||||
return convertedValue;
|
return convertedValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean useConversionHint(Type type, Type rawType) {
|
private boolean useConversionHint(Type type, Type rawType, Type hint) {
|
||||||
if (FunctionTypeUtils.isTypeCollection(type)) {
|
if (hint instanceof ParameterizedType) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (FunctionTypeUtils.isTypeCollection(type)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (!FunctionTypeUtils.isPublisher(type) && !rawType.equals(type) && !FunctionTypeUtils.isMessage(type)) {
|
else if (!FunctionTypeUtils.isPublisher(type) && !rawType.equals(type) && !FunctionTypeUtils.isMessage(type)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user