class AbstractNestablePropertyAccessor
, method getPropertyValue
is not doing unwrapping of Optional
, that causes InvalidPropertyException
being thrown:
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Property referenced in indexed property path '" + propertyName +
"' is neither an array nor a List nor a Set nor a Map; returned value was [" + value + "]");
I think Optional
should be natively supported and value unwrapping should take place.
I have a spring-boot application that is configured to use HibernateValidator, when constraint violation is happening, HV itself is behaving by the book throwing a proper exception.
This issue is forcing me to do manual pojo validations instead of relying on HibernateValidator.
More details can be found here: https://hibernate.atlassian.net/jira/software/c/projects/HV/issues/HV-1794 Jira: HV-1794.
Let me know if you need more details.
Comment From: JenniferPruitt
I noticed that there is a similar problem at https://github.com/kburger/rdf4j-objectmapper/issues/47. Perhaps we can refer to this issue to find more context about the bug.
Comment From: snicoll
Thanks for the report and sorry it took so long to process. I am not sure if that's still actionable but, if it is, can you please share a small sample we can run ourselves to reproduce the problem. Both those links are 404 for me and I'd like to make sure we're looking at the same thing.
Comment From: snicoll
Possibly related to #19935
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.