mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
ObjectToOptionalConverter uses Optional.ofNullable after ConversionService invocation
Issue: SPR-12589
This commit is contained in:
+1
-1
@@ -69,7 +69,7 @@ final class ObjectToOptionalConverter implements ConditionalGenericConverter {
|
||||
}
|
||||
else {
|
||||
Object target = this.conversionService.convert(source, sourceType, new GenericTypeDescriptor(targetType));
|
||||
return Optional.of(target);
|
||||
return Optional.ofNullable(target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user