Description
Michał Sobkiewicz opened SPR-15839 and commented
It seems like SpringValidatorAdapter
doesn't handle <list element>
literal. It is sometimes expected, as far as I understand JSR 380 spec correctly. Please, review http://beanvalidation.org/2.0/spec/2.0.0.cr3/#valueextractordefinition-builtinvalueextractors and correct me if I'm wrong. Note <iterable element>
, <map key>
and <map value>
too.
I hope that "Reference URL" contains SSCCE. Will keep it for some time. I've attached all interesting files just in case something goes wrong.
As you (will be able to) see, validator.validate(bean, errors)
ends up with IllegalStateException
. I would expect one field error instead.
One more thing: I believe it's not about "bean property versus direct field access". Getters and setters are here. To be sure, I checked not only BeanPropertyBindingResult
but DirectFieldBindingResult
too. Same result.
Affects: 5.0 RC3
Reference URL: https://github.com/perceptron8/spr-13482
Attachments:
- MyBean.java (276 bytes)
- MyConfiguration.java (387 bytes)
- MyTest.java (921 bytes)
- pom.xml (2.08 kB)
Issue Links:
- Compatibility with Hibernate Validator 6.0 GA [SPR-15808] #20363 Compatibility with Hibernate Validator 6.0 GA ("is depended on by")
- Wrong exception thrown by Springframework Beans when Type validation fails [SPR-15936] #20490 Wrong exception thrown by Springframework Beans when Type validation fails ("is duplicated by")
- Compatibility with Bean Validation 2.0 and JPA 2.2 [SPR-13482] #18061 Compatibility with Bean Validation 2.0 and JPA 2.2
- Error on type argument constraint validation failure [SPR-15916] #20470 Error on type argument constraint validation failure