Support java8 optional retrieval and growing in SpEL #26209
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: duplicate
A duplicate of another issue
we are using SpEL to set some values to a DTO and i have grow null references set to true, and hoping SpEL has support to get and set optionals and also grow null references.
for below code snippet i get following error
java org.springframework.expression.spel.SpelEvaluationException: EL1010E: Property or field 'anotherDtoField' cannot be set on object of type 'java.util.Optional' - maybe not public or not writable?
when i try updating the optional in the sampleDto it works without any issues
it would be nice for Spring to take care of setting and getting from optional as any other java field.
The text was updated successfully, but these errors were encountered: