Skip to content

SpringValidatorAdapter fails to retrieve value for Bean Validation 2.0's "<list element>" literal [SPR-15839] #20394

Closed

Description

@spring-projects-issues

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:

Issue Links:

Referenced from: commits de09f8c, 26284ca

Activity

  1. spring-projects-issues commented on Aug 8, 2017

    @spring-projects-issues
    CollaboratorAuthor
  2. added
    type: bug
    in: core
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions